Code drawer

JSON diff

Spot added, removed, and changed lines in a private comparison.

Privacy built inYour work stays with you

Your work stays private in your browser while you use this tool.

In short

What does json diff do?

Compare two valid JSON values structurally and report added, removed, or changed values at paths such as $.settings.theme or $.items[2]. Object key order and source formatting do not create differences.

Input
Two valid JSON documents.
Result
A line-oriented comparison of their normalized forms.
Price
Free
Account
Not required
A quick, useful guide

How to use json diff

01

Add your input

Two valid JSON documents.

02

Choose your settings

Spot added, removed, and changed lines in a private comparison.

03

Save or copy

A line-oriented comparison of their normalized forms.

A practical tip

Formatting both inputs first removes meaningless whitespace differences.

Practical uses

When to use json diff

Review a small API response before and after an API change.

Find altered fields between two configuration snapshots.

Copy a compact path-based change summary into a bug report or code review.

Worked example

A concrete json diff example

Input
Original {"plan":"free","tools":3}; updated {"plan":"free","tools":4,"live":true}
Result
The diff contains + $.live: true and ~ $.tools: 3 -> 4. The unchanged $.plan field is omitted.
What to expect

How it works

Both sides are parsed with JSON.parse(). Objects are traversed recursively over a sorted union of keys; arrays are compared by numeric position; and primitive or type changes use Object.is(). The copied summary serializes the before and after values at each discovered path.

Know before using

Limits and edge cases

  • Arrays are positional: inserting an item near the start can make every later index appear changed, and moved values are not detected as moves.
  • The comparison inherits JSON.parse() numeric precision and duplicate-key behavior and offers no ignore paths, unordered-set mode, patch output, or tolerance for numeric differences.
References

Standards and sources

Common questions

JSON diff FAQ

Is json diff free to use?

Yes. JSON diff is free to use.

Does json diff keep my work private?

Yes. Your work stays private while you use the tool — nothing you enter is uploaded.

Does whitespace or object key order affect the JSON diff?

No. Both inputs are parsed before comparison, so indentation and object member order are ignored. Array order remains significant.

Why does an array insertion produce several changed paths?

The algorithm compares array index 0 with index 0, index 1 with index 1, and so on. It does not calculate a sequence alignment or infer moves.