JSON Compare & Diff

Compare two JSON documents and see exactly what changed: every added, removed, and modified value with its path, plus a side-by-side diff. Key order and formatting are ignored, so only real differences show up. Free, and nothing leaves your browser.

Try it:
Paste JSON into both boxes to compare them.

See what changed — not what moved

Semantic diff, key order ignored • A path for every change • Side-by-side view • Optional array-order ignore • Long IDs compared exactly • Nothing leaves your browser

How to compare two JSON files

  1. Paste the original JSON on the left and the changed version on the right — or open or drop a .json file into either box.
  2. Read the summary: how many values were changed, added, and removed. If both documents hold the same data, you’ll see that too.
  3. Browse the Changes list, where every difference has its path and its old and new value, or switch to Side by side to see the changes in context.
  4. Hit Copy list of changes to paste a plain-text summary into a ticket, a pull request, or a chat.

Both boxes validate as you type. If one of the documents is broken, the tool points at the exact line and character and explains the fix — a trailing comma, a curly quote, a missing bracket.

Semantic compare vs. a plain text diff

A general diff checker compares text line by line. Run two JSON files through it and it flags every reordered key, every re-indented block, and every 1.0 that became 1 — noise that buries the one change you care about. This tool parses both documents first and compares the data: {"a": 1, "b": 2} and {"b": 2, "a": 1} are equal, formatting is irrelevant, and what’s left is the list of values that really differ.

The side-by-side view follows the same idea: both documents are formatted identically and their keys sorted A–Z before they’re lined up, so the highlighted lines are real changes, with long unchanged stretches folded away.

Reading the results

  • Changed — the key exists on both sides, but its value is different.
  • Type changed — same key, different kind of value, like "42" (a string) becoming 42 (a number), or an object turning into an array.
  • Added — the key or array item exists only in the changed version.
  • Removed — it exists only in the original.

Paths use the notation you’d write in JavaScript: settings.theme for a nested key, items[2].price for a value inside an array, and ["first name"] for keys with spaces or special characters. An index like [3→4] means the item moved from position 3 to 4 because something was inserted before it.

Arrays: in order, or as a set

By default, array order matters, and arrays are aligned the way a text diff aligns lines: insert one item at the top of a list and you get one addition, not a list full of changes. When order carries no meaning — tags, roles, permissions, feature flags — tick Ignore array order. Arrays are then compared as sets, and items are matched by their content wherever they sit.

Long IDs are compared exactly

Here’s a difference most online JSON diff tools miss: {"id": 9007199254740993} versus {"id": 9007199254740992}. JavaScript can’t tell those numbers apart — both turn into the same 64-bit float — so a tool built on JSON.parse reports the documents as identical. HandyTray reads numbers losslessly and compares long IDs digit by digit, so a changed database key or post ID never slips through.

What people compare

  • API responses before and after a deploy — a quick regression check without writing a test.
  • Config files across environments, to find why staging behaves differently from production.
  • Translation files — keys that exist in one language but not in another show up as removed or added.
  • package.json, feature-flag exports, and other settings that drift between branches or machines.

All of it stays on your machine: both documents are parsed and compared in your browser, and nothing is uploaded or stored — worth knowing when you’re diffing production data. Need to tidy a single file instead? The JSON formatter & validator beautifies, minifies, and pinpoints syntax errors.

JSON compare FAQ

Key order, array order, reading paths, and keeping your data private.

How do I compare two JSON files online?

Paste the original JSON on the left and the changed version on the right — or open or drop a .json file into either box. The comparison runs as you type: you get a count of differences, a list of every change with its path, and a side-by-side view. Copy list of changes gives you a plain-text summary for a ticket or a pull request.

Does the order of keys matter?

No. JSON objects are unordered by definition, so {"a": 1, "b": 2} and {"b": 2, "a": 1} are treated as the same data. Whitespace, indentation, and number spelling (1.0 versus 1) don’t count as differences either — only the data itself does.

What is the difference between JSON compare and JSON diff?

None, really — both mean finding what changed between two JSON documents. A plain text diff compares the documents line by line, so reordered keys or different formatting show up as changes. A semantic JSON diff, like this one, parses both documents first and compares the actual values.

Can I ignore the order of array items?

Yes — tick Ignore array order and arrays are compared as sets: [1, 2, 3] matches [3, 1, 2], and items are paired by their content rather than their position. It’s the right choice for lists like tags, roles, or permissions. Leave it off when order carries meaning, such as steps or ranked results.

What does a path like items[3→4] mean?

The item was at index 3 in the original and is at index 4 in the changed version, usually because something was inserted before it — and some of its values changed too. Arrays are aligned the way a text diff aligns lines, so a single inserted item shows up as one addition instead of making every item after it look different.

How do I find missing keys between two translation files?

Paste the complete language file on the left and the one you’re checking on the right. Every key that exists only on the left is listed as Removed — those are your missing translations — and keys that exist only on the right show up as Added. Changed entries are strings that differ, which in translation files is expected.

Are my files uploaded anywhere?

No. Both documents are parsed and compared entirely in your browser — nothing is sent to a server, stored, or logged, so production data and API responses with tokens stay on your machine. The page even keeps working offline once it has loaded.

Comparing tokens or encoded payloads? Decode them first with our Base64 decoder — it unpacks JWTs too.