Skip to content
JSON Diff
Processed entirely in your browser. Nothing is uploaded.
Original JSON0 B
Changed JSON0 B

JSON Diff – Compare Two JSON Files Online

Compare two JSON documents by structure, not by lines — free, private and running entirely in your browser

Compare two JSON documents by structure instead of by lines. Key order and indentation never count, 1.0 equals 1, and every difference is listed with its full path. Everything runs in your browser and nothing is uploaded.

Last updated: 22 October 2026

Guide, examples, and FAQ

About JSON Diff

What it does

JSON Diff parses both documents and walks them side by side. Objects are compared key by key, so reordered keys are not differences. Arrays are compared by index (with a longest-common-subsequence match for plain values), ignoring order, or by an identifier field such as id. Each difference is Added, Removed, Changed, Type changed or Moved.

Who it is for

For developers and testers checking API responses, config files, fixtures, translation files or webhook payloads, where a text diff reports noise from formatting and key order.

When to use it

Use it when both sides are JSON (or JSONC / JSON Lines). For plain text, use Text Diff. For spreadsheets, use Excel Diff.

Key features

  • Structural comparison

    Key order and whitespace are ignored. Numbers compare by value, escaped unicode equals the literal character, and integers longer than 15 digits keep their exact digits.

  • Smart arrays

    By index, Ignore order, or Match by key with suggested identifier fields. Items that only changed position are labelled Moved instead of removed and added.

  • Ignore noisy fields

    Ignore key names (updatedAt), JSONPath ($..id, $.items[*].id), wildcards (*.timestamp) or a key regex. Optional numeric tolerance, case-insensitive keys and strings, trimming, and null or empty as missing.

  • Exports

    Copy or download JSON Patch (RFC 6902), Merge Patch (RFC 7386), a CSV of changes, a Markdown table for pull requests, or plain diff text.

How to use JSON Diff

  1. 1Paste, drop or open the original JSON on the left and the changed JSON on the right. Load sample shows an example.
  2. 2Press Compare (Ctrl/Cmd+Enter). If a side is invalid, read the line, column and hint, or press Auto-fix and review the preview.
  3. 3Open Settings to choose how arrays are matched and which fields to ignore.
  4. 4Step through differences with F3 / Shift+F3, switch to Changes to filter and search, or export a patch.

Example

Before

{ "id": 1, "name": "Jane Doe", "score": 95, "roles": ["admin", "user"] }

After

{ "name": "Jane Smith", "id": 1, "score": "95", "roles": ["admin", "editor", "user"] }

~ $.name  "Jane Doe" → "Jane Smith"
! $.score  number → string
+ $.roles[1]  "editor"

The reordered id key is not reported. Inserting “editor” is one addition, not a shift of every later item. The score is reported as a type change because 95 and "95" are different types.

Common problems and fixes

  • One side says invalid JSON

    Click the error to jump to the position. Comments and trailing commas are accepted. For single quotes, unquoted keys or Python literals, use Auto-fix and check the preview before applying it.

  • Everything in an array is marked changed

    The items probably shifted. Open Settings and choose Match by key or Ignore order.

  • A large file is slow

    Inputs above about 200 KB are compared in a background worker so the page stays responsive. The side-by-side view shows the first 5,000 lines; the Changes view lists every difference.

Benefits

  • Save time

    What used to take a script or a desktop app now takes seconds — compare by lines the moment the page loads.

  • Stay private

    Nothing is uploaded. JSON Diff runs client-side, which keeps confidential by lines on your own machine.

  • Get accurate output

    Deterministic processing and clear error reporting mean the result you see is the result you ship.

  • Work anywhere

    Once the page has loaded, JSON Diff runs in the browser on desktop or mobile. Reloading the page needs a connection.

Common use cases

  • API regression checks

    Compare a saved response with today’s response and ignore timestamps and request ids.

  • Config and environment changes

    See exactly which settings differ between staging and production.

  • Webhook debugging

    Compare two payloads with arrays matched by id to see which records changed.

  • Test fixtures and migrations

    Confirm a migrated document matches the expected output, within a numeric tolerance.

  • Translation files and package.json

    Find added and removed keys without noise from reordering.

Tips & best practices

  • Arrays of records usually compare best with Match by key. Pick the field that is unique per item, such as id or sku.
  • Use Ignore order for arrays that are sets, such as tags or roles.
  • Add $..updatedAt or *.timestamp as an ignore rule to hide fields that always change.
  • The patch exports describe the exact change from left to right; ignore rules only affect what is shown on screen.

Common mistakes to avoid

  • Comparing two arrays of records by index after one record was inserted at the top. Every later item looks changed. Switch to Match by key.
  • Expecting "1" and 1 to be equal. They are different JSON types and are reported as Type changed.

Frequently asked questions

What is a JSON diff?

A comparison of two JSON documents by their structure — keys, values and array items — rather than by text lines. Reordered keys and different indentation are not differences.

Is my JSON uploaded?

No. Parsing and comparison run in your browser. The page makes no network request with your data, and inputs are kept only in memory for this visit.

How are arrays compared?

By index by default, with plain values aligned so one insertion is a single addition. You can also ignore order, or match items by an identifier field such as id. Items that only moved are labelled Moved.

Can I ignore fields like timestamps?

Yes. Add key names, JSONPath rules such as $..updatedAt or $.items[*].id, wildcards such as *.timestamp, or a regular expression for key names.

What is the difference between Changed and Type changed?

Changed means the same type with a different value. Type changed means the type differs, for example the number 1 against the string "1", or null against "".

Which formats are accepted?

JSON, JSON with comments and trailing commas, and JSON Lines (one document per line, read as an array). Stringified JSON is unwrapped automatically.

Are large numbers safe?

Yes. Integers beyond JavaScript’s safe range, such as 12345678901234567890, keep their exact digits when compared and exported.

What can I export?

JSON Patch (RFC 6902), JSON Merge Patch (RFC 7386), CSV with Path, Change, Old and New columns, a Markdown table, or plain diff text.

When another tool fits better

  • JSON Formatter. You need to read, format or repair one JSON document.
  • JSON Validator. You only need to check that a document is valid.
  • Text Diff. The files are plain text, or you want a unified line patch.
  • Excel Diff. The data is in spreadsheets.

Conclusion

JSON Diff shows only real differences between two JSON documents, with paths you can copy and patches you can apply.

Ready to try JSON Diff?

Scroll back up to start now, or continue with another free diff tool.

Guides and glossary

Learn and reference material connected to JSON Diff.