Skip to content

JSON Compare and Diff Checker

Paste two JSON documents and see exactly which values were added, removed or changed, listed by path. Key order and formatting are ignored, so only real data differences show up.

Upload Left JSON

Drop or select the original / old / source JSON file.

left JSON · original data

Upload Right JSON

Drop or select the updated / new / target JSON file.

right JSON · updated data

Comparison Controls

Waiting for two valid JSON inputs
Ready. Paste or upload two JSON inputs to compare.
StatusWaiting
Total Changes0
Added0
Removed0
Changed0
Type Changed0
Compared Paths0

Left vs Right JSON

Left idle Right idle Diff idle

Left JSON

0 chars 0 lines
Waiting for left JSON
No left file

Right JSON

0 chars 0 lines
Waiting for right JSON
No right file

Visual Diff Tree

Tree idle
Compare two valid JSON inputs to see the visual diff tree here.
Green means added, red means removed, purple means changed, and amber means the value type changed.

Detailed Change List

List idle
No diff report yet.

Summary Report

Report idle
No report yet.

Notes

When array order matters, keep Strict order on. When your arrays contain the same values in different positions, use Ignore order to reduce noisy diffs.

Runs in your browser. Nothing you type, paste or open here is uploaded.

To compare JSON, paste the original into Left JSON and the new version into Right JSON (or upload two .json files), then select Compare JSON. The tool parses both and walks every key and array item. Each difference is listed with its path, such as users[0].role, a label (added, removed, changed or type changed) and the old and new values.

How to compare two JSON files

  1. Add both versions. Paste the old JSON on the left and the new JSON on the right, or use Select Left File and Select Right File. A loaded file is compared right away.
  2. Pick the rules. Keep Array Compare on Strict order when position matters, or choose Ignore order for lists like tags. Tick Treat numeric strings as numbers if "3000" and 3000 should match.
  3. Compare. Select Compare JSON. The counters show total, added, removed, changed and type-changed values, and the Visual Diff Tree lists each one.
  4. Share the result. Use Copy Summary, Copy Diff Report or Download Report, which saves json-diff-report.txt.

How this JSON diff works

A text diff compares lines, so moving a key or re-indenting a file shows up as a change. A JSON diff compares data. This tool parses both sides with JSON.parse, then walks them together: objects are matched key by key, arrays index by index, and plain values are compared directly. Two objects with the same keys in a different order are equal.

Take these two documents:

Left:  {"name": "app", "version": 1, "tags": ["a", "b"], "port": "3000"}
Right: {"name": "app", "version": 2, "tags": ["b", "a"], "port": 3000, "beta": true}

With the default settings the result is five differences:

PathTypeOldNew
versionChanged12
tags[0]Changed"a""b"
tags[1]Changed"b""a"
portType changedstringnumber
betaAddedmissingtrue

In the Visual Diff Tree, green rows are added, red are removed, purple are changed and amber are type changes. When a whole object is added or removed, it's reported once at its own path rather than once per nested field.

Options that cut noise from a JSON compare

Run the same example with Ignore order and Treat numeric strings as numbers turned on, and only two differences remain: version changed and beta added. Each option handles a common source of false alarms:

  • Array Compare: Ignore order. Both arrays are sorted by their content before comparing, so ["a","b"] equals ["b","a"]. Leave it on Strict order for lists where position means something, like steps or ranked results. With Ignore order on, the index in a path refers to the sorted position.
  • Trim string values before compare. "Ali " and "Ali" count as equal.
  • Treat numeric strings as numbers. Useful when one API returns "3000" and another returns 3000.
  • Path Filter. Type part of a path, such as settings or users[0], to show only differences whose path contains it. Matching ignores case.

JSON compare vs text diff: which one to use

Use this JSON compare when you care about the data: checking an API response after a deploy, comparing feature-flag files across environments, or reviewing a changed fixture. Use a line-based diff checker when layout matters too, such as reviewing a hand-edited config before committing it, or when the input isn't valid JSON yet.

If either side fails to parse, the comparison stops and the badge under that editor shows the parser's error message. Fix it there, or clean it up in the JSON formatter first, which points to the exact line and column. Beautify Both re-indents both editors (and sorts keys when Preview Keys is set to sort) so you can read them side by side.

Limits of comparing JSON in the browser

Both files are parsed in your browser, so nothing is uploaded. That also means JavaScript's number rules apply: integers above 9,007,199,254,740,991 are rounded before comparing, so two long IDs that differ only in the last digits can look equal. Keep IDs like that as strings. If a key appears twice in one object, only its last value is compared.

In Strict order mode, inserting one item at the start of an array shifts every later index, so each one is reported as changed. Switch to Ignore order for that kind of list.

Frequently asked questions

How do I compare two JSON files online?

Upload the original with Select Left File and the new version with Select Right File. The comparison runs as soon as a file loads and lists every difference by path.

Does key order matter when comparing JSON?

No. Objects are matched key by key, so {"a":1,"b":2} and {"b":2,"a":1} are equal. Array order does matter unless you set Array Compare to Ignore order.

What does "type changed" mean in a JSON diff?

The value exists on both sides but its JSON type differs, for example the string "3000" on the left and the number 3000 on the right.

Can I ignore whitespace inside string values?

Yes. Tick Trim string values before compare, and leading or trailing spaces in strings are ignored.

Can I save the JSON diff result?

Yes. Download Report saves a .txt file with the summary and every change, including old and new values. Copy Diff Report puts the same detail on your clipboard.

Is it safe to use a JSON compare online tool with private data?

With this one, yes. Both documents are parsed and compared in your browser, so private API responses never leave your device.

Updated 11 October 2026Reviewed by the ToolzyLab teamHow we test our tools