All tools

Compare JSON

Compare two JSON documents by value, key order ignored, and get a JSON Patch. Free, with no account or uploads.

Paste two JSON documents to compare them

Changes are found by value, not by line: moving a key is not a change, and numbers are compared exactly.

Paste below or drop a text file here · up to 10 MB

Object key order is ignored; arrays compare by position; numbers compare exactly. The patch transforms source into comparison, with at most 500 changes.

Add, remove, replace, move, copy and test are supported. Failures leave the source intact. Removing the root is rejected because it would leave no JSON document.

Results appear here; your source stays intact.
Start with a document or try the example.Ctrl/Cmd + F to find · Ctrl/Cmd + Z to undo · Escape, then Tab to leave the editor

Source, comparison and schema text stay in this tab and clear on refresh. Files are not uploaded. The editor never runs pasted JavaScript. Cancel stops the worker without changing your source.

How it works and help
One workspace. All on your device.
5 million characters · 100 levels · 100,000 values

A little help along the way

Say what you want to do: make it readable (Edit, to format or repair), look through it (Explore), turn it into CSV or YAML (Convert) or compare two (Compare). The page says at once whether your JSON is valid. Under More options every workflow has its tab, with Query to select data and Schema to check a contract. Results stay separate until you choose Use result as source.

Questions people ask

Does moving a key count as a change?
No. Objects are compared by their values, so the same keys in another order are the same. Arrays are compared position by position, and numbers are compared exactly.
What is the JSON Patch it gives?
A list of operations (add, remove, replace) in the RFC 6902 format that turns the first document into the second. You can preview applying a patch to your source before using it.
How do I compare two files?
Open or paste the first in Your JSON and the second in Comparison JSON, then press Compare JSON. Swap documents turns the comparison the other way round.

This page is the JSON formatter, opened for this one job; every other tool it has is one press away. Each of its settings is explained on the JSON formatter's own page.