JSON Diff Tool - Compare JSON Online, Free & Instant
Paste two JSON documents and see every added, removed, changed, and moved value with its exact path. Key order and formatting are ignored, arrays are matched smartly, and nothing is uploaded.
JSON Diff
Compare two JSON documents by structure. Arrays are matched by meaning, not just position, and everything runs in your browser.
Original (left)
EmptyUpdated (right)
EmptyPaste JSON on both sides, then compare
Press Ctrl+Enter, or turn on live compare to update as you type.
Built for developers
A smarter way to compare JSON
JSONDiffTool compares the structure of your data, not the text. You see what actually changed, without noise from indentation, key order, or array shifts.
Semantic comparison
Whitespace, indentation, and key order never count as differences. Only real changes to keys and values are reported.
Smart array matching
Detects inserted, removed, and moved items, or match by position, by a key field like id, or ignore order entirely.
Ignore rules and tolerance
Skip fields like updatedAt with JSONPath, JSON Pointer, or key names. Treat 1 and "1" as equal, ignore case, or set a number tolerance.
Four result views
Switch between tree, side by side, inline, and list views. Changed characters are highlighted, and the diff is marked in both editors.
Export and merge
Export JSON Patch (RFC 6902), Merge Patch (RFC 7386), unified diff, Markdown, HTML, or CSV. Apply or revert single changes in one click.
Private by design
Comparison runs in your browser and your JSON is not uploaded to our servers. No account or signup needed.
Simple workflow
How to compare two JSON files online
No setup. Add both documents, compare, and review the changes.
Add your JSON
Paste the original JSON on the left and the updated version on the right. You can also drag and drop a .json file, upload one, or load from a URL.
Compare
Click Compare or press Ctrl+Enter. Turn on Live compare to update the result as you type.
Review changes
Browse additions, deletions, modifications, type changes, and moved items. Filter by type or search by path, then jump between changes.
Example: comparing two versions of a product
Here the price dropped, the stock value changed from a string to a number, a tag was added, and a new field appeared. A text diff would also flag any reformatting. A JSON diff reports only these four changes.
{
"sku": "A-100",
"price": 19.99,
"stock": "12",
"tags": ["new", "sale"]
}{
"sku": "A-100",
"price": 17.5,
"stock": 12,
"tags": ["new", "sale", "gift"],
"currency": "USD"
}- ~ Changed
price19.99 → 17.5 - ⇄ Type
stock"12" (string) → 12 (number) - + Added
tags[2]"gift" - + Added
currency"USD"
What is a JSON diff tool?
A JSON diff tool compares two JSON documents and highlights the differences between them. It is useful when debugging API responses, reviewing configuration changes, testing applications, or comparing data from different environments.
Instead of searching through large JSON objects by hand, you can compare both versions and quickly identify additions, removals, and modifications, each with the exact path where it happened, such as items[0].price.
JSON diff vs text diff
A text diff, like the one in git diff, compares files line by line. Change the indentation, reorder keys, or add a trailing newline and it can report hundreds of changed lines even though the data is identical.
A JSON diff parses both documents first, so {"a":1,"b":2} and {"b": 2, "a": 1} are equal. What remains are changes to the data itself, which is usually what you want when reviewing API responses and configs.
Common use cases
API response changes
Compare responses before and after a release to catch removed fields, renamed keys, and type changes that could break clients.
Config drift
Compare dev, staging, and production config files to find settings that differ between environments.
Data migrations
Check that a migration or ETL job did not drop, rename, or alter fields by comparing input and output.
Test fixtures
Compare expected and actual JSON in tests, and ignore volatile fields like ids and timestamps.
Export differences as JSON Patch
JSON Patch (RFC 6902) describes how to turn one JSON document into another as a list of operations such as add, remove, and replace. It is handy for sending minimal updates over an API or storing change history. For the example above, the exported patch looks like this:
[
{ "op": "replace", "path": "/price", "value": 17.5 },
{ "op": "replace", "path": "/stock", "value": 12 },
{ "op": "add", "path": "/tags/2", "value": "gift" },
{ "op": "add", "path": "/currency", "value": "USD" }
]You can also export JSON Merge Patch (RFC 7386), a unified diff, Markdown, HTML, CSV, or a plain text summary from the Export panel.
Frequently asked questions
What is a JSON diff tool used for?
A JSON diff tool shows exactly what changed between two JSON documents: which keys were added, which were removed, and which values were modified. Developers use it to compare API responses, review config changes before a deploy, check data migrations, and spot differences in test fixtures.
Does key order matter when comparing JSON?
No. JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are treated as identical. Whitespace and indentation are ignored too, so only real changes to keys and values are reported.
How are arrays compared?
By default the tool uses smart matching, which detects inserted, removed, and moved items instead of flagging every item after an insert as changed. You can also match items by position, match them by a key field such as id, or ignore array order completely from the Options panel.
Can I ignore fields like updatedAt or timestamps?
Yes. Open Options and add paths to Ignore paths, one per line. You can use JSONPath (for example $..updatedAt), a JSON Pointer (for example /meta/version), or a bare key name to ignore that key anywhere in the document.
Why do two identical-looking JSON files show differences?
Usually it is a type or value detail: the string "1" versus the number 1, a different letter case, extra spaces inside a string, or null versus a missing key. Options let you treat these as equal, and you can set a number tolerance for values like 0.1 + 0.2 versus 0.3.
Is my JSON data private?
The comparison runs in your browser, and your JSON is not uploaded to our servers. Share links keep both documents in the URL hash, which browsers do not send to a server. If you use Load from URL, your browser fetches that address directly.
Can I compare JSON with comments or trailing commas?
Yes. Relaxed syntax such as comments, trailing commas, single quotes, and unquoted keys is still compared, and a Fix to strict JSON button converts the input to valid JSON. If the input is broken, you get the line and column of the error with a Go to error link.
How do I share a comparison with a teammate?
Click Share link. Both JSON documents and your options are encoded into the link, so anyone who opens it sees the same comparison. Avoid sharing links that contain secrets or tokens.
Can I export the differences?
Yes. You can export JSON Patch (RFC 6902), JSON Merge Patch (RFC 7386), a unified diff, a Markdown report, a standalone HTML report, a CSV of all changes, or a plain text summary.
Is there a size limit?
There is no fixed limit. Inputs larger than about 250 KB are compared in a background worker so the page stays responsive, and long results are rendered virtually. Very large files are ultimately limited by your browser's memory.