
JSON diff: compare two JSON documents
Paste two JSON documents. Whitespace and key order are ignored, and every real difference is listed by its path.
Runs in your browser. Pasted data never leaves it.
How to use it
- Paste the old JSON on the left and the new JSON on the right.
- Read the JSON changes list: each row is an added, removed or changed value with its JSONPath.
- Switch to Side by side to see the formatted text with the changed lines marked.
Questions
How does it decide what changed?
It finds the shortest set of added and deleted lines that turns the original into the changed text (the Myers algorithm, the same idea as git diff and diff --minimal). When a block of lines is replaced, the lines are paired up, and inside each pair the words that changed are highlighted.
What does “compare as JSON” do?
Both sides are parsed, optionally have their keys sorted, and are printed with the same indentation before the comparison, so only real differences show. A separate “JSON changes” list names each added, removed or changed value by its JSONPath. Arrays are compared by position.
Is there a size limit?
Pasted text up to a few megabytes works well. Very large files with very many differences fall back to showing the whole block as replaced, to keep the page responsive.
Can I use the unified diff with git or patch?
The copied text is a standard unified diff with 3 lines of context, readable by patch and git apply when the file names match. Line endings are normalised to \n before comparing.
Is what I paste or test sent anywhere?
No. This page works entirely inside your browser, and pasted data never leaves your device. It makes no network requests while you use it, and the page also tells your browser to block them (a Content-Security-Policy with connect-src 'none'), so even a bug could not send your data out. To check it yourself, open your browser's developer tools, go to the Network tab, and use the tool: nothing will appear. There is no account, no analytics and no logging.
