JSON Diff – Compare Two JSON Documents
Paste two JSON documents and see what changed in the data, regardless of key order or indentation.
Processed locally in your browser· Your data stays in your browser.
What is JSON Diff – Compare Two JSON Documents?
Two JSON files can be equal in meaning and still look completely different as text: keys in another order, minified versus pretty-printed, different indentation. This tool parses both sides, rewrites them with recursively sorted keys and a 2-space indent, and then compares them line by line.
Added, removed and changed properties and array items are highlighted with colour and + / − markers, in an inline or side-by-side view. If either side is not valid JSON, the tool tells you which one and where the parser stopped. You can copy the result as a unified diff.
How does it work?
- Paste the original JSON on the left and the modified JSON on the right.
- If a side is invalid, fix the error reported under that box (the message names the side).
- Read the highlighted lines: red with − were removed or changed, green with + were added or changed.
- Choose inline or side-by-side view, copy the unified diff, or swap the sides to reverse the comparison.
Common use cases
- Comparing two API responses to see what changed between environments or releases.
- Reviewing configuration or package manifests where key order is not significant.
- Checking that a data migration or serializer change kept the same content.
- Spotting the one field that differs between a working and a failing payload.
Examples
Try this input in the tool above:
{"name":"Ada","role":"admin","tags":["a","b"],"active":true}Privacy
JSON Diff – Compare Two JSON Documents runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
Object key order is ignored, but array order is meaningful and is kept. Numbers are parsed as JavaScript numbers, so integers beyond 2^53 or extra precision may be normalised. Comments and trailing commas are not valid JSON.
Frequently asked questions
Does key order matter?
No. Keys are sorted before comparing, so {"a":1,"b":2} and {"b":2,"a":1} are identical. Array item order still counts.
Why do I see a different line count from my file?
The tool re-prints both documents in a canonical form (2-space indent, one property per line). That is what makes formatting differences disappear.
Can I compare very large JSON files?
Inputs are compared by lines and can be several megabytes; above 2 million characters in total the comparison is refused to keep your browser responsive.
Related tools
Text Diff – Compare Two Texts
Paste an original and a modified text to see exactly what was added and removed, at the level of detail you choose.
Text Tools
JSON Formatter & Beautifier
Turn a minified or messy JSON document into readable, consistently indented text, with a precise error message if the JSON is invalid.
JSON & Data
JSON Validator
Check whether a piece of text is valid JSON and locate the exact character where it goes wrong.
JSON & Data
JSON Key Sorter
Reorder the keys of every JSON object alphabetically to get a stable, canonical document.
JSON & Data
JSON Viewer
Explore a JSON document as an expandable tree instead of a wall of text, with a summary of its structure.
JSON & Data
JSONPath Finder
Type a JSONPath expression and instantly see the values it selects in your JSON, together with the normalized path of each match.
JSON & Data
JSON Minifier
Compress a JSON document to one compact line and see how many bytes you saved.
JSON & Data