JSON Diff

Paste two JSON objects — semantic diff highlights exactly what changed

View
Original JSON Ctrl+Enter to compare
Modified JSON
Diff Result
+ added   removed

Paste JSON in both panels above
Diff updates automatically as you type

0 added
− 0 removed
Identical:

Free Online JSON Diff Tool

Compare two JSON documents instantly with our free JSON diff tool. Unlike text-based diff tools, this tool performs a semantic diff — it understands JSON structure, so reordered keys don't show up as false changes. Only real data differences appear in the output.

Features

How to Use the JSON Diff Tool

  1. Paste the original JSON into the left (Original) panel
  2. Paste the modified JSON into the right (Modified) panel
  3. Diff updates automatically — or press Ctrl+Enter to also auto-format both inputs
  4. Read the outputgreen + lines are additions, red − lines are deletions
  5. Copy the diff with the Copy Diff button to paste it elsewhere

What is a Semantic JSON Diff?

A standard text diff compares files line by line. If you reformat a JSON file — adding spaces, changing indentation, or reordering keys — a text diff will show hundreds of false changes.

A semantic JSON diff parses both inputs into data structures first, then compares the data, not the text. The result: only real changes appear. Reordering {"a":1,"b":2} to {"b":2,"a":1} shows zero differences, because the data is identical.

Frequently Asked Questions

Is my JSON data safe?
Yes. All comparison happens entirely in your browser using JavaScript. Your JSON is never sent to any server. The tool works offline too.
Why does reordering object keys show no difference?
JSON objects are unordered by definition (per RFC 8259). This tool compares the data semantically — if two objects have the same keys and values, they're identical regardless of key order. That's correct JSON behaviour.
How does array diffing work?
Arrays are ordered, so position matters. This tool uses a longest-common-subsequence (LCS) algorithm to find the minimal set of insertions and deletions — the same approach used by git diff. For arrays larger than 500 elements, it falls back to positional comparison for performance.
What's the maximum JSON size?
There's no hard limit. The tool handles typical API responses and config files (up to a few MB) smoothly. Very large files with deeply nested structures may take a moment to diff.
Can I compare JSON arrays at the top level?
Yes. Both inputs can be any valid JSON — object, array, string, number, or null. The diff handles all cases.