Find your next tool

Browse tools or search by task

Explore JSONToonPro

JSON Tools

JSON Diff & Compare Online – Compare JSON Objects

Compare two JSON documents online and highlight added, removed and changed values. Semantic comparison ignores key order and runs in your browser.

Runs locally in your browser. Nothing you paste is uploaded.

JSON Diff & Compare workspace
Original JSON
Changed JSON

How to Compare JSON Online

Paste the original and changed JSON into the two panels. Compare parsed values and inspect the reported paths. Both inputs must parse; a syntax error should be resolved before interpreting a structural difference.

Semantic JSON Diff vs Text Diff

Text diff compares lines and whitespace. Semantic JSON diff compares values, so indentation and object-key order do not create changes by themselves. Use Text Diff when the exact source spelling or comments are part of your review.

Added, Removed and Changed Values

An added path appears only in the new document, a removed path only in the old one, and a changed path has different values. Review type changes carefully: a numeric string and a number are different even when they look similar.

Key Order, Arrays and Nested Objects

Object property order is ignored. Arrays are ordered, so changed positions matter and an insertion may affect later indexes. Nested paths help distinguish a changed child from a replacement of its entire parent structure.

JSON Compare Examples

Comparing {"id":1,"name":"Ada"} with {"name":"Ada","id":2} reports the id change, not the key reorder. Use small samples when checking how arrays or null values should be treated.

More examples and technical details

What a JSON Diff Actually Compares

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.

The Three Kinds of Change

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:

// before { "name": "Ada", "age": 30, "city": "London" } // after { "name": "Ada", "age": 31, "country": "UK" }

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.

Where This Comes Up Day to Day

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.

A Note on Arrays

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.

Everything Stays in Your Browser

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.

Standards and references

Frequently asked questions

How do I compare two JSON files?

Paste each file into its respective panel and inspect the semantic difference paths.

Does JSON key order affect the comparison?

No. Object-key order is ignored when comparing parsed values.

How are arrays compared?

Arrays are ordered and compared by position, so an insertion can affect subsequent indexes.

What is the difference between JSON diff and text diff?

JSON diff compares parsed structure; text diff compares the original lines and characters.

Is either JSON document uploaded?

No. Input is processed in this browser tab and is not uploaded by the tool. Copy and download are actions you control; ordinary page analytics do not receive tool input.