How to Compare JSON Files Online
How do I compare two JSON files?
Paste the original JSON in one side and the modified JSON in the other, and the diff highlights every change as you type. Additions, deletions, and modified lines are color coded, with a similarity score that tells you at a glance how much the two documents share.
The three steps
Open the JSON Diff tool, paste the original document in the A editor and the modified one in the B editor, and the comparison runs live. Toggle unified view for a single column, copy the result as a unified patch, or download it. Nothing is uploaded and large inputs run in a background worker.
What the colors mean
The diff highlights three kinds of change. Additions are marked in teal, deletions in red, and modified lines are paired onto the same row so you can read the before and after at a glance instead of scrolling a delete block against an insert block.
- Teal: lines added in the new version
- Red: lines removed from the old version
- Paired rows: a removed line replaced by an added one
Side-by-side or unified
The default side-by-side view keeps the old and new documents aligned for scanning. The unified view merges both into a single column, which is closer to a git-style patch and useful when the change is concentrated in a few lines.
Cutting the noise
JSON that was re-prettified can produce diffs that are mostly whitespace. Ignore whitespace and ignore case options strip that noise so the diff shows real changes only. They never alter the documents; they only change what counts as a difference.
Reading the similarity score
The similarity score is the share of lines that are identical on both sides, as a percentage of all lines involved. 100% means the documents are identical; 0% means nothing is shared. It is a quick sanity signal, not a semantic guarantee, since identical lines can still sit in different places.
JSON diff versus text diff
The same diff engine also powers the Text Diff tool for any two text inputs. JSON Diff adds JSON framing so you can drop in raw documents and read the result as code. For logs, config files, or markdown, Text Diff is the right starting point.
FAQ
Can I compare two JSON files online without uploading?
Yes. The comparison runs entirely in your browser, in a background worker for large inputs. Neither document ever leaves your machine.
What do the colors mean in the diff?
Additions are teal, deletions are red, and modified lines are paired onto one row so you see the removed line and its replacement side by side.
What does the similarity score mean?
It is the share of lines that are identical on both sides, as a percentage of all lines involved. 100% means identical; 0% means nothing in common.
JSON diff or text diff, which should I use?
JSON Diff frames the comparison as code for two JSON documents. Text Diff is the same engine with no framing, best for logs, config files, and markdown.