Tools / JSON Diff Checker

JSON Diff Checker

Compares two JSON documents by meaning, not by text. Key order does not matter. Everything runs in your browser; nothing is uploaded.

Before

After

Options

Arrays
Ignore paths, one per line. Examples: $.meta.updatedAt, $..id, $.items[*].etag

What is inside

What is inside the tool.

Semantic compare

Objects are compared key by key, so reordering keys or changing indentation produces no difference. Each change shows its path, such as $.users[id=2].role, and the before and after values.

Four kinds of change

Added, removed, changed (same type, new value) and type change (a number that became a string). A type change is called out on its own because 3 to "3" breaks code that a plain value change would not.

Three ways to read arrays

By position, the strict reading. Ignoring order, where equal items cancel out and extra duplicates still count. Or matched by a key field you name, such as id, so a reordered list of records shows only real edits, and records without the key are matched by equality.

Rules for noise

Ignore paths with patterns like $.meta.updatedAt, $..id or $.items[*].etag. Treat null and a missing key as equal. Trim strings. Ignore letter case. Set a number tolerance so 19.99 and 19.990000001 do not show up as a change.

Located errors

If a side is not valid JSON, the tool tells you the line and column, what it expected, and shows the line with a marker. A switch allows comments and trailing commas for config-style files.

Take the result away

Copy or download an RFC 6902 JSON Patch (position-based arrays), a Markdown report with counts, the options used and every change, or read a sorted-key line diff. Open files from disk; read locally.

Worked example

The sample you see on opening the tool, read three ways.

Before and After describe an API service. Between them: version 1.4.0 to 1.5.0, replicas 3 to "3", a price that differs by a rounding error, DEBUG false to true, a new TRACE setting, tags v1 to v2, one user's role changed, users listed in another order plus a new user, a new owner, and a new timestamp.

SettingsDifferences foundWhat you learn
Defaults (arrays by position)15Reordering the users makes every user look changed. Noisy, correct for strict comparison.
Match arrays by id, tolerance 0.001, ignore $.meta.updatedAt9: 4 added, 1 removed, 3 changed, 1 type changeOnly real edits: version, replicas type, DEBUG, TRACE, tag v1 replaced by v2, Sam is now editor, Kim added, owner added.
Same, then "Compare by position" for the patchA patch of replace, add and remove operationsApplying the patch to Before gives After. We test that on 400 random document pairs.

Reference

Exactly what each rule does.

Ignore-path patterns

PatternIgnores
$.meta.updatedAtThat one key. Ignoring an object also ignores everything under it.
$..idAny key named id at any depth.
$.items[*].etagThe etag key of every element of items.
$.a.*Every key directly under a.

Array modes

ModeMatches elementsBest for
By positionIndex to indexTuples, ordered steps, anything where order is meaning.
Ignore orderAny equal element, once eachTag lists, sets, ids.
By key fieldObjects with the same value in the named field; others by equalityLists of records with an id.

Paths and patches

Paths are shown in a JSONPath-like form for reading. Patches use JSON Pointer as RFC 6902 requires, with ~ written as ~0 and / as ~1. In key mode a path such as users[id=2] is a reading aid, which is why a patch is offered only for position-based comparison.

How to use it

Five steps for a clean answer.

Step 1

Paste both sides, or open files. If either side has a syntax error, fix it using the line and column shown.

Step 2

Start with defaults to see the strict difference, then add rules for noise one at a time so you know what each one hid.

Step 3

For lists of records, switch to key mode and name the field. A reordered list should show no changes.

Step 4

Add ignore paths for timestamps, etags and generated ids, and a tolerance for floating-point output.

Step 5

Copy the Markdown report into a review or ticket, or download the patch if the change should be applied.

What it cannot do

Limits.

No move detection

If an element changes position in position mode, you see changes at both positions. Use ignore order or key mode instead. The tool does not emit RFC 6902 move or copy operations.

Patches are position-based

A patch is generated only when arrays are compared by position, and it contains add, remove and replace. Tolerance, trimming and case rules mean the patch leaves values alone that the rules treat as equal.

Big files

Comparison runs on your device. A synthetic 20,000-key document pair compared in under a second in our test. The text diff view is skipped when the two sides are too large for a line-by-line comparison, and file open stops at 5 MB.

JSON only, with a JSONC option

The comments and trailing commas switch removes both before parsing. It does not accept other JSON5 features such as unquoted keys or single quotes. Duplicate keys follow the browser parser: the last one wins.

Large numbers

Numbers too long for a standard double, such as 9007199254740993, 1e400 or 0.12345678901234567, are kept as written and compared by their digits, so 9007199254740993 and 9007199254740992 are reported as different. 1.0, 1 and 1e0 are equal, and so are 100 and 1e2. A line above the result says how many numbers were compared this way, the changes list shows them as written, and the report and patch carry the original digits. Number tolerance is applied exactly, to the written digits, unless the numbers and tolerance span more than 20,000 decimal places, in which case they are compared exactly with no tolerance, and the result, report and patch note say so. A tolerance the tool cannot read is reported instead of ignored. Numbers with more than 9 exponent digits or more than 10,000 digits are refused with a message instead of being compared.

What it does

What it does.

Free JSON diff checker: semantic compare with exact paths, type changes, array matching by id or ignoring order, ignore paths, number tolerance, JSON5-style comments, RFC 6902 JSON Patch export and a Markdown report. It runs in your browser.

FunctionWhat it does here
Key order and indentation noiseIgnored
Exact path of each changeYes
Reordered list of recordsKey mode shows only edits
Timestamps and rounding noiseIgnore paths and tolerance
Machine-readable outputRFC 6902 patch and Markdown

Reading the result

What each readout means.

The summary line

Counts the differences by kind, for example "15 differences: 3 added, 0 removed, 11 changed, 1 type change". The chips under it show the same four counts.

Changed versus type change

Changed means the same path holds a different value of the same type. A type change means the type itself differs, for example the number 1 against the text "1".

The options

Array order, matching by an id field, rounding noise, timestamps and null versus missing all change what counts as a difference. If the count drops after you tick one, that option is what removed the differences.

The patch

The Patch tab compares arrays by position and its note says so. If two arrays were reordered, check that note before applying the patch to real data.

Common mistakes

What goes wrong, and what the tool does about it.

A reordered list shows as many changes

By position, ["a","b","c"] against ["c","a","b"] is three changes. Switch Arrays to Ignore order, or Match objects by key field, and the same pair is identical.

Expecting a patch from an order-insensitive comparison

The JSON patch tab is built only for comparing by position. In the other modes the tab says to switch Arrays back first.

Long numbers that look identical

Many tools read 9007199254740993 and 9007199254740992 as the same number. This tool keeps long numbers as written and reports them as different. A line above the result says when numbers were compared this way.

Duplicate keys

{"a":1,"a":2} is read as {"a":2}. The last value wins, as in a browser, so the first is not compared.

Questions

Before you ask.

Is my JSON uploaded?

No. Parsing and comparing run in your browser tab. Opening a file reads it locally.

Why does "3" versus 3 show as a type change?

Because many systems treat them differently. The tool never treats a number and a string as equal.

Why is there no patch in key mode?

A patch needs a path the receiving system can follow. Keyed paths like users[id=2] are not part of RFC 6902, so the patch tab asks you to switch to position-based comparison.

How does ignore order handle duplicates?

Each element on one side cancels one equal element on the other. [1,2,2] against [1,2] reports one extra 2.

Does it keep my documents?

No. Nothing is saved. Close the tab and they are gone.

What does it cost?

Nothing. No account.

Your data

What stays on your device.

The tool runs in this browser tab. It does not need a server to do its job. The two documents you paste stay in the page. Nothing is copied, downloaded or shared unless you press the button for it.

Try it

Paste two versions and see exactly what changed.

Open JSON Diff Checker
A wooden desk with glasses, a coffee cup, a plant and the edge of a laptop, banner image on the JSON Diff Checker page

Try it now.

JSON Diff Checker runs in your browser. No account needed.

JSON Diff Checker

See it at work

Free JSON diff checker: semantic compare with exact paths, type changes, array matching by id or ignoring order, ignore paths, number tolerance, JSON5-style com

JSON Diff Checker
Fields
API
CLI
before
after
allow_comments
arrays
array_key
hiringsai tool json-diff-checker
before string
after string
allow_comments False
arrays index
10 fields, 2 required
curl -X POST https://hiringsai.com/api/v1/tools/json-diff-checker/run
-d '{"input": {"before": "<text>", "after": "<text>"}}'
JSON result
hiringsai run json-diff-checker --input '{"before": "<text>", "after": "<text>"}'
also callable over MCP
JSON result printed
Free toolAPI and MCPNo account
Fields
beforestring
afterstring
allow_commentsFalse
arraysindex
Ways to use it
pagethis app
APIPOST .../run
CLIhiringsai run
MCPtools/call
API call
POST /api/v1/tools/json-diff-checker/run
input: {"before": "<text>", "after": "<text>"}
JSON result back
Command line
hiringsai run json-diff-checker
--input <json>
JSON result printed
The JSON Diff Checker page as it opens
JSON Diff Checker10 fields
The page as it opens, captured from the live site.
The JSON Diff Checker app at phone width
JSON Diff Checkerphone layout
The same app at phone width.
A desktop computer on a white desk with a lamp
JSON Diff CheckerFree tool
Free JSON diff checker: semantic compare with exact paths, type changes, array matching by id or ignoring order, ignore paths, number tolerance, JSON5-style com
A woman working at a desktop monitor
JSON Diff CheckerAPI and MCP
Call it from a script over the API or MCP.