Skip to content
Toolars
Explore

Text & JSON Diff

Compare text by line, word, or character and JSON by structure, with split and unified views, change navigation, and unified-patch export.

Task path / input to outcome

Paste, load, or swap both versions

Report bug

Local processing

Processing details

Tool inputs are processed on your device.

Resources may be downloaded to run this tool. Account services are separate.

Preparing offline use…

Privacy information

Task path / input to outcome

How to compare text and JSON

  1. 01

    Paste, load, or swap both versions

    Put the original value in the Original pane and the updated value in the Changed pane, up to 262,144 UTF-16 code units each. You can paste from the clipboard, load a text file into either side, swap the two sides in one click, or start from Load sample. At least one side must carry content before a comparison runs.

  2. 02

    Choose Text or JSON mode

    Text mode compares prose, configuration, logs, and code as lines. JSON structure parses both panes as strict JSON and reports deterministic structural changes for objects and arrays — it rejects invalid input and names the side that failed to parse.

  3. 03

    Pick precision and normalization

    Smart, the default, shows line-level hunks with word-level highlights inside changed lines and falls back to character granularity for CJK text. Lines is pure line-level, while Words and Characters force that granularity inside every changed line. Ignore text whitespace collapses spacing before comparing, Ignore letter case treats VALUE and value as equal, and Normalize line endings stops CRLF versus LF from rewriting the whole report.

  4. 04

    Read and navigate the result

    Split aligns both versions in two columns with line numbers; Unified streams one report with + and - markers. Unchanged regions fold away — pick 3, 5, 10, or All lines of context — and Previous/Next change jumps between change groups and announces the position. JSON mode lists one record per difference with a path such as /items/0/name and both values side by side.

  5. 05

    Copy or export the result

    Copy result for a review or ticket. Download .patch exports a unified patch based on the Original text; check the target file and patch before applying it. JSON mode downloads a .txt report. Auto-compare refreshes while you edit and pauses above 131,072 UTF-16 code units per side, where Compare now takes over.

Tool facts

Processing
In your browser
Input leaves this device
Never
Retention
Nothing is stored
Price
Free

Your input stays in the browser.

Text & JSON Diff uses its verified local execution path and does not create a hidden input or output history.

Local execution

Runs inside the current browser tab.

No hidden processing

Active tool data never becomes a Toolars document record.

No account required

Use the core workflow without creating a profile. Favorites sync to your account after you sign in.

Immediate reset

Clear the tab and the active working data is gone.

What Text & JSON Diff actually does

Two copies of a configuration file disagree and one of them is wrong; a JSON API payload changed shape between deploys and the diff must be exact, not eyeballed; a translated paragraph came back and someone has to see what actually moved. Paste both versions and compare the config in Text mode with Smart precision — the changed line keeps its context and only the moved words are highlighted — pick JSON structure for the payload, where the report names the exact path /limits/timeout that went from 30 to 60, and Characters for the paragraph. Export the .patch for review and verify it against the original file before applying it to a repository. Everything runs in an isolated Worker on this machine, so unreleased configs, tokens, and draft copy never leave the tab.

Common questions

Which text precision should I use?
Smart is the default: it aligns whole lines into hunks and highlights the changed words inside each changed line, falling back to character granularity for CJK text. Lines reports only line-level additions and removals with no inline highlighting, while Words and Characters force that finer granularity inside every changed line. For configuration, logs, and most prose, Smart gives the clearest picture.
What do the Split and Unified views show?
Split places the two versions in aligned columns with line numbers on both sides, so a changed line shows its original and updated form together. Unified streams a single report with + and - markers, the shape used by patch tools. Both views share the inline highlights, the folding of unchanged regions — controlled by the 3, 5, 10, or All context selector — and the Previous/Next change navigation.
How are JSON objects and arrays compared?
Arrays are compared by index: the first element with the first, the second with the second, and so on, with no inference of moves or identity keys, so a reordered array reports changes at the moved positions. Object keys are compared as a sorted union of both sides, and every difference is reported with a JSON Pointer-style path — a key present on one side only is an addition or a removal, a shared key with different values is a change. A value that does not parse as strict JSON is rejected with a message naming the side that failed.
What does the exported .patch contain?
The text-mode export is a unified patch with three lines of context around each change and generic Original/Changed headers. Apply it only to the matching original text after reviewing the target path. Ignored whitespace or case changes are not reconstructed, line-ending normalization can change the result, and standard patch tools may add a missing final newline. The export is a review aid, not a guarantee of an exact or automatically applicable repository change.
What are the limits?
Each input may be up to 262,144 UTF-16 code units. Auto-compare pauses above 131,072 UTF-16 code units per side, where the explicit Compare now button takes over. Line and character comparisons stop with a clear message when the pair would need more than a safe local amount of comparison work, the report is capped at 10,000 records, and a run that exceeds the short time limit is cancelled safely — a pathological pair fails fast instead of freezing the tab.
Is the text I paste uploaded anywhere?
No. Both panes stay in the current browser tab, the comparison runs in an isolated local Worker, input is never sent or retained, and no account is required.

Keep reading

Related tasks, not a dead end.

Move into another focused workspace without returning to the full index.

URL Workbench

Clean URL lists with signed-link protection and per-line reasons. Compare components and export sitemaps.

Edit

JSON Explorer

Query JSONPath, extract fields and round-trip JSON Pointer records without losing large-number precision.

Inspect

JSON Schema Validator

Validate Draft 7 or 2020-12 locally with exact error paths; infer schemas from multiple observed samples.

Inspect

HTML Publishing

Clean pasted HTML for publishing while preserving lists, links and table semantics; preview changes safely.

Publish