JSON Formatter
Format, validate, minify, and analyze JSON in one place.
Compare two JSON documents and see exactly what was added, removed, or changed. The diff is semantic, so it parses both sides and ignores key order and formatting, showing you real changes to the data instead of noise from how it was printed. Everything runs in your browser, so your JSON never leaves your device.
A JSON diff answers a deceptively simple question: what changed between these two documents? The catch is that JSON has structure, and structure does not always survive a round trip through a formatter or a serializer. If you compare two JSON files as plain text, you are really comparing characters, and characters lie. Reorder the keys in an object, switch from tabs to spaces, or add a trailing newline, and a text diff lights up with dozens of red and green lines even though the data is byte-for-byte identical in meaning.
That is the whole problem this tool exists to solve. It parses both sides into real values first, then walks the two trees and compares them by structure and value rather than by their printed form. Two objects with the same keys and the same values are equal no matter what order those keys appear in, so a reordered payload reports zero differences. You end up looking at genuine changes to the data instead of noise from how it happened to be printed.
Every difference falls into one of three buckets. A key that exists on the right but not the left is added. A key that was on the left and is gone on the right is removed. A key that is present in both but holds a different value is changed, and for those you get to see both the old and the new value side by side. Here is a small before and after that hits all three at once:
The diff reads: age changed from 30 to 31, city was removed, and country was added. Three lines of signal, nothing else, which is exactly what you want when you are scanning a real payload.
JSON diffing is one of those quiet tools you reach for constantly once you have it. API response regression testing is the classic case: capture a known-good response, hit the endpoint again after a change, and diff the two to confirm nothing shifted that you did not intend. Comparing config across environments is another, where you line up staging against production and immediately see which feature flag or timeout is out of sync.
It is just as useful when reviewing changes to a fixtures file before you commit them, or when you are staring at two payloads that look identical to the eye but behave differently, and you need the tool to point at the one field that is off. Verifying a data migration is the same story: diff a record before and after to prove the transformation did what the ticket said and nothing more.
Arrays are compared by index position, which is worth understanding because it can surprise you. If you insert a new element near the start of an array, every element after it shifts down one slot, so the diff reports all of those as changed. That is not a bug, it is exactly what index-based comparison means: position two used to hold one thing and now holds another. When you expect an insertion to read as a clean single addition, remember that a positional diff sees it as a cascade, and read the result with that in mind.
Both documents are parsed and compared locally with client-side JavaScript. Nothing is uploaded, logged, or sent to a server, so you can safely diff API responses full of tokens, customer records, or anything else sensitive. Close the tab and it is gone.
Comparing plain text instead of structured data? Reach for the text diff and JSON formatter alongside this one, and browse the rest of the JSON toolkit while you are there.