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.
Related
Where to go next
Try a fix in the editor or browse more articles.