How to Compare Two JSON Objects (Structurally, Not as Text)
Compare two JSON values online for free and see exactly what changed — key order and formatting differences are correctly ignored, unlike a plain text diff.
By QR Ivify Team
Two versions of an API response, a config file before and after someone edited it, two JSON payloads that are supposed to represent the same thing — comparing them with a plain text diff has an annoying false-positive problem: JSON that got reformatted, or had its keys reordered, looks completely different to a line-by-line comparison even when the underlying data is identical.
Why a Text Diff Gets This Wrong
A text diff tool compares lines. {"name":"John","age":30} and {"age":30,"name":"John"} represent the exact same data, but as text, every line is different — a text diff reports the whole thing as changed, which is technically true about the text and completely unhelpful about the data. The same problem shows up when one file is minified and the other is pretty-printed, or when someone's editor auto-reformatted a file with different indentation.
What a Structural Comparison Does Instead
QR Ivify's JSON Compare parses both sides into actual data first, then compares the data — not the text. Two objects with the same keys and values are identical regardless of what order the keys appear in, how much whitespace separates them, or which one has trailing commas cleaned up. What's left after that is only the differences that actually matter: fields that were added, fields that were removed, and values that genuinely changed.
Step by Step
- Open JSON Compare.
- Paste the original JSON on the left and the changed version on the right.
- Click "Compare."
- Review each difference, listed by its exact path — added fields, removed fields, and changed values.
Reading the Result
Each difference is labeled and located precisely: $.user.age means "the age field inside the user object," $.tags[1] means "the second item in the tags array." Added fields show only a new value, removed fields show only the old one, and changed fields show both — the before and after — so you can see exactly what shifted without hunting through the raw JSON yourself.
How Arrays Are Compared
Arrays are compared position by position — the first item against the first item, the second against the second, and so on. This is straightforward and predictable, but worth knowing: inserting a new item in the middle of an array shifts every item after it by one position, which shows up as a change at every shifted index rather than a single clean "item inserted here." For arrays where items might reorder or get inserted anywhere, keep that in mind when reading the result.
Frequently Asked Questions
Does this care about key order?
No — {"a":1,"b":2} and {"b":2,"a":1} are reported as identical, since they represent the same data. A plain text diff would incorrectly flag these as different.
How is this different from the Text Diff Checker? Text Diff Checker compares line by line, so reformatted (but semantically identical) JSON shows as changed. JSON Compare parses both sides and compares the actual data, so only real differences show up.
How does this handle arrays? By position — item 0 is compared to item 0, item 1 to item 1, and so on. Inserting an item partway through an array will show as changes at every position after the insertion, not as a single clean "inserted" entry.
What if one side isn't valid JSON? You'll see a clear error naming which side (original or changed) failed to parse, rather than a confusing or silent failure.
Does this upload my JSON anywhere? No. Both parsing and comparison happen entirely in your browser.
Try It
Need to see what actually changed between two JSON values, without false positives from reformatting? QR Ivify's free JSON Compare diffs the real data, not the text. Need to validate one side first? See JSON Validator. Comparing plain text instead? Try Text Diff Checker.
Related articles
How to Decode Base64 Back to Text
Decode Base64 to text online for free, with correct Unicode handling and a clear error for invalid input instead of garbled output.
How to Base64 Encode Text (Without Breaking Unicode)
Encode text to Base64 online for free, with correct handling of Vietnamese, emoji, and other Unicode text — a common failure point in naive implementations.
How to Convert a JSON Array to CSV
Turn a JSON array of objects into a CSV table — with nested objects flattened into columns and commas/quotes handled correctly, not just a naive join.