JSON Diff Online – Compare JSON Files

Local processing

Compare two JSON documents and review added, removed, and changed paths.

51 chars
58 chars
Differences
1 added0 removed1 changed
~$.version
Left: 1Right: 2
+$.features[1]"diff"

JSON comparison guide

How to compare JSON documents

Paste two JSON documents into the comparison tool to find values that were added, removed, or changed. VetaTool validates both sides first, then reports differences with JSON paths so you can locate each change quickly. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • Structural JSON comparison
  • Added, removed, and changed path detection
  • Object and array comparison
  • JSON syntax validation
  • Browser-local processing

How to use

  1. Paste the original JSON into the left editor.
  2. Paste the updated JSON into the right editor.
  3. Fix any syntax errors reported for either document.
  4. Review added, removed, and changed paths in the comparison output.

Path-based JSON differences

Each result identifies the location of a change with a JSON path. Object keys appear by name, while array entries include their numeric index.

Path-based output is useful when API responses or configuration files are too large to compare visually line by line.

Values and data types matter

The comparison distinguishes strings, numbers, booleans, null values, objects, and arrays. A numeric 1 and a string "1" are different values even though they look similar in plain text.

  • Added paths only exist in the right document.
  • Removed paths only exist in the left document.
  • Changed paths exist on both sides with different values or types.

Compare private payloads locally

Both JSON documents stay in your browser. The comparison does not send API responses, configuration files, or copied records to a backend service.

JSON diff example

The version changes, a feature is added, and the active field appears only in the updated document.

Left JSON

Left:  {"version":1,"features":["json"]}
Right: {"version":2,"features":["json","diff"],"active":true}

Diff output

Changed $.version: 1 → 2
Added $.features[1]: "diff"
Added $.active: true

Common questions

Frequently asked questions

Does JSON object key order create a difference?

No. Object properties are compared by key, so changing only their written order does not change the parsed JSON value.

Are array positions compared?

Yes. Arrays are ordered, so moving a value to another index can produce removed, added, or changed path results.

Can I compare invalid JSON?

Both documents must be valid JSON before a meaningful structural comparison can be produced.

Are the compared documents uploaded?

No. Validation and comparison run locally in your browser.

Looking for broader references? Browse all developer guides.