JSON Diff - Compare JSON Documents Online
About JSON Diff
Tracking down what changed between two JSON documents is a common chore. Maybe you are comparing a staging API response against production, reviewing a config file before and after a deploy, or checking that a migration script transformed data correctly. Plain text diffs are noisy because whitespace and key order create false positives. This tool parses both documents and compares them structurally, so only real data differences show up.
Every difference is reported with its path, such as
$.user.email or $.items[2].price, plus the
old and new values.
How to Use It
Paste the original JSON into the left editor and the modified JSON into the right editor. The diff results panel below updates automatically. Each row shows a coloured status badge (green for additions, red for removals, yellow for changes), the affected path, and the old and new values. If both documents are structurally identical, you will see a confirmation message instead.
What Counts as a Difference
- Key order and formatting are ignored.
{"a":1,"b":2}and a pretty-printed{"b":2,"a":1}are equal. So are1and1.0, which are the same JSON number. - Types matter.
1and"1", ornulland a missing key, are reported as different. - Arrays are compared by position. Index 0 is compared with index 0, and so on. If an item is inserted at the start of a list, every later item shows as changed and the last one as added. Sort both arrays the same way first if order does not matter to you.
- Large integers are exact. 64-bit IDs such as
12345678901234567890are compared digit for digit instead of being rounded to the same JavaScript number.
To compare JSON as text instead, including formatting and key order, use the text diff. To tidy both inputs before reading them, run them through the JSON formatter.
Related Tools
JSON Formatter & Beautifier
Format and beautify JSON with customisable indentation and syntax highlighting.
JSON Validator
Validate JSON syntax and get clear, human-readable error messages.
JSON Minifier
Minify JSON by removing all unnecessary whitespace for smaller payloads.
JSON Tree Viewer
Visualise JSON as a collapsible tree to explore deeply nested structures.