Skip to content
Simple Tools

JSON comparison

Compare two JSON documents and find added, removed or changed members using JSON Pointer paths.

Enter data

Paste the before and after versions. Each field has a separate 50,000 UTF-16-unit limit. Fields marked with an asterisk are required.

Maximum 50,000 UTF-16 units. Data is not saved.

Maximum 50,000 UTF-16 units. Data is not saved.

About this tool

Compare configuration files or API responses without formatting noise. Object members match by decoded name, while arrays match by zero-based index. A type change counts as one difference at that path. The report contains paths and change kinds, but not document values. Member names can still be confidential.

How to use the calculator

  1. Paste both JSON documents and run comparison.
  2. Inspect report paths: an empty string denotes the root, and /0 the first array element.
  3. Copy the report and review the documents in an editor. The report cannot be applied as a patch.

Calculation details

Formula and calculation method

Objects: match names regardless of order. Arrays: match indices. Strings: decoded Unicode units without normalization. Numbers: exact tokens, so 1 and 1.0 differ. Paths use ~0 for ~ and ~1 for /.

Worked example

For {"a":1,"b":2} and {"b":2,"a":3,"c":true}, the report shows a change at /a and addition at /c. Reordering members alone adds no difference. Member “a/b” has path /a~1b.

Limitations

  • Up to 50,000 UTF-16 units per field, 64 container levels and 10,000 values per document. Duplicate member names and unpaired Unicode surrogates, including escaped ones, are rejected. This is a deliberately narrower interoperability profile, not proof of compatibility with every parser.
  • Maximum 1,000 differences; exceeding it produces an error rather than a partial report. No merging, JSON Patch, array matching by ID or mathematical equivalence of number spellings. Inserting an array item can create many index differences.
  • Text output is limited to 500,000 UTF-16 units. In comparisons, combined report-path lengths cannot exceed 100,000 units; exceeding a limit gives an error, not a partial result.

Sources

Frequently asked questions

Does member order matter?

Not in objects. Array indices matter, so reordering items changes the data. This is not set comparison.

Why do 1 and 1.0 differ?

We compare number spelling rather than floating-point approximations. Large numbers are not rounded, but mathematically equivalent spellings can differ.

Can I apply the report as JSON Patch?

No. It lists paths and change kinds without values or the operations required by JSON Patch. It is for manual review.

Does data leave the browser?

Inputs and results are not sent to a server or analytics or stored in the URL or persistent form storage. Loading the page requires a hosting request. Clipboard copies, printing and browser extensions remain outside reset control. Avoid secrets.

Read the supporting guide

Generator

JSON formatter and validator

Check JSON syntax, add indentation or remove unnecessary whitespace without rounding numbers.

Open tool
Generator

JSON escape and unescape

Turn plain text into a quoted JSON string literal or decode one layer of JSON escape sequences.

Open tool