Compare JSON files
Paste two JSON documents or API responses and see which keys and values changed. Nothing is uploaded, so you can safely compare payloads containing real data.
Text comparison tool
Paste text into both panes, then press Compare.
Why JSON comparison needs care
JSON is structured data written as text, which creates a specific problem: two documents can be semantically identical while differing wildly as text. Reorder the keys in an object, change the indentation from two spaces to four, or switch from compact to pretty-printed output, and a plain text comparison will report the whole file as changed even though no value actually moved.
The fix is to normalise before comparing. Format both documents with the same indentation, and where you can, sort the keys consistently. Once both sides are formatted the same way, a line-by-line comparison becomes an accurate structural diff — and it is often more useful than a purely semantic one, because it shows you where in the document the change sits.
How to compare two JSON files here
- Pretty-print both documents with the same indentation.
- Paste or upload one into each pane.
- Keep granularity on line for a structural view.
- Tick Ignore whitespace if the two files were formatted by different tools.
- Switch to word or character granularity to see exactly which value inside a changed line differs.
Comparing API responses safely
The most common reason to diff JSON is debugging: the same endpoint returns something different in staging than in production, or a response changed after a deployment and you need to know what. Those payloads routinely contain access tokens, customer email addresses, internal identifiers and pricing.
Because this tool never transmits your text, you can paste a real response without exposing it to a third party. That matters more than it might seem — pasting a production payload into a tool that uploads it is a data-handling incident, even when nothing bad comes of it.
Reading the result
Added keys appear in green on the right with a plus marker. Removed keys appear in red on the left with a minus marker. Lines present in both but with a changed value show as modifications, with the old value on the left and the new one on the right.
At word granularity, a line like "port": 3000 becoming
"port": 8080 highlights only the number rather than the whole line, so
you can scan a long configuration file quickly. Use the up and down arrows above the
result to jump between changes rather than scrolling.
Limits
Large responses are fine — the comparison runs on your own machine, so the constraint is your browser rather than a server quota. Documents of several thousand lines compare in well under a second. Uploaded files are capped at 5 MB; pasted text has no cap.
Comparing JSON — common questions
Is my text uploaded to a server?
No. The entire comparison runs in your browser using JavaScript. Your text is never transmitted, logged or stored anywhere. You can verify this yourself: open your browser developer tools, switch to the Network tab, and run a comparison — no request carrying your text will appear. The only network activity is the page itself and, if enabled, analytics and advertising scripts, none of which receive what you typed.
What is the difference between character, word and line comparison?
Line comparison treats each line as a single unit — useful for code and structured data where a whole line changes at once. Word comparison highlights individual words that changed within a line, which suits prose. Character comparison is the most granular and pinpoints single-character edits, useful for spotting typos or subtle changes in identifiers.
How do I compare JSON files?
Paste or upload both JSON files and use line granularity for a structural view of what changed. For consistent results, format both files with the same indentation first — otherwise formatting differences will be reported alongside real value changes. Enabling "ignore whitespace" also helps when only indentation differs.
Is there a limit on how much text I can compare?
There is no artificial limit. Uploaded files are capped at 5 MB to keep the browser responsive, but pasted text has no cap. Very large inputs — tens of thousands of lines — will take a moment to process because the work happens on your own device rather than on a server.
How do I ignore whitespace when comparing?
Tick the "Ignore whitespace" option before comparing. This collapses runs of spaces and tabs and trims each line, so differences in indentation or trailing spaces are not reported. There are matching options to ignore letter case and to ignore blank lines.