Compare and diff two JSON files online
Spot exactly what changed between two API responses or fixtures. Yellorn key-sorts JSON before diffing, so a reordered key never appears as a false difference.
What changed between these two payloads?
When you have two versions of the same data — yesterday's API response and today's, a fixture and the live payload, two customers' configs — the question is always the same: what actually changed? Yellorn answers it with a side-by-side diff, entirely in your browser.
How to run a comparison
- Open both payloads in their own tabs (paste them, drop two files, or load two URLs).
- Click Compare in the tab bar footer, then pick exactly two tabs.
- Click Run Comparison. A new diff tab opens with Monaco's read-only diff editor, both payloads side by side, changes highlighted line-by-line.
Prefer the keyboard / mouse shortcut? Right-click any inactive tab and choose Compare with the active tab to diff the two directly.

Why the diff sorts JSON keys first
A naive text diff treats {"a":1,"b":2} and {"b":2,"a":1} as different — even though they are the same object. Yellorn key-sorts JSON on both sides before diffing, so a reordered key never shows up as a false change. You see only the differences that actually matter: added keys, removed keys, and changed values.
Non-JSON content (XML, YAML, plain text) is diffed as text, inheriting the left tab's format so the diff editor highlights with the right syntax.
When two payloads look identical but aren't
Sometimes the diff is empty but the bytes differ — usually an invisible whitespace or line-ending difference. Yellorn flags this with a “Looks identical, bytes differ” notice and a Show whitespace toggle that paints ␍ (CR), ␊ (LF), and ␉ (TAB) glyphs so the hidden difference becomes visible. The diff also stops trimming trailing whitespace, so a stray \r actually shows.
This is the classic cause of a request that “looks right” but gets rejected — see the multipart line-ending guide for the full story.
What it's good for
- API regression testing — diff a known-good response against a fresh one.
- Fixture consistency — keep test fixtures in sync with reality.
- Customer payload triage — find the one field that differs between a working and a broken request.
Frequently asked questions
How do I diff two JSON files online?
Open each payload in its own tab, click Compare in the tab bar footer, pick exactly two tabs, and click Run Comparison. A side-by-side diff opens with changes highlighted line by line. The whole comparison runs in your browser.
Why don't reordered JSON keys show up as differences?
Yellorn key-sorts JSON on both sides before diffing, so {"a":1,"b":2} and {"b":2,"a":1} are treated as identical. You see only the differences that matter: added keys, removed keys, and changed values.
The diff is empty but the two payloads aren't identical — why?
They differ by invisible whitespace or line endings. Yellorn shows a 'Looks identical, bytes differ' notice plus a Show whitespace toggle that paints CR (␍), LF (␊), and TAB (␉) glyphs, and it stops trimming trailing whitespace so a stray \r actually appears.
Can I compare YAML or XML, not just JSON?
Yes. Non-JSON content is diffed as text and inherits the left tab's format, so the diff editor highlights it with the correct syntax. The key-sorting normalisation is applied only to JSON, where reordering is semantically meaningless.
Related
Where to go next
Try a fix in the editor or browse more articles.