JSON diff checker
Paste two JSON documents and see which values changed. Both are formatted with sorted keys first, so key order and spacing don't count as differences.
Free, no sign-up. Runs in your browser. Nothing you type or upload is sent to us or stored.
At a glance
- Formatting
- Keys sorted A to Z at every level, two-space indent, one value per line
- Arrays
- Item order is kept, because it's meaningful in JSON
- Invalid JSON
- Compared as plain text, with the parser's error shown
Share the final version as a link
Paste the version you settled on into Liite's quick paste and get a short link to send to anyone. No account needed.
JSON diff checker: what to know
This page starts the text diff for this case. For every option and how to use it, see the text diff.
Why format before comparing
Two JSON files can hold exactly the same data and still look different: keys in another order, everything on one line, or tabs instead of spaces. A plain text comparison flags all of that. Formatting both sides the same way first leaves only the changes that matter.
In the example, the second document has its keys in a different order and spread over several lines. After formatting, the diff shows just three changes: the plan, the page limit and a new tag.
Reading a JSON diff
Each changed value appears as a removed line and an added line, with the value highlighted. A new key appears as an added line. Array items are compared in order, so an item inserted at the start shifts the rest down and shows as one added line, not a change to every item.
Comments and trailing commas aren't allowed in JSON. If either side has them, the tool says it couldn't read the JSON and compares the text as it is.
Questions
Does key order count as a difference?
No. Keys are sorted on both sides before comparing, so only added, removed or changed values show.
Can it compare XML?
It compares XML as plain text, line by line. It doesn't reformat XML first, so put both files in the same layout for the cleanest result.