Compare JSON
Find structural JSON differences with path filters and a readable before-and-after change report.
How it works & useful details
How it works
Compare values by structure. Object key order and whitespace do not matter; array positions do. A changed type appears as one change at its path. Filter the preview to inspect changes; the export always includes every change, up to 10,000 and the output limit. The report is a list of differences, not a JSON Patch document.
Limits & privacy
Up to 1,000,000 characters, 50,000 values and 64 levels. Live previews pause above 40,000 characters; run the tool to process the full supported input. Imported files must be UTF-8 and under 1 MB. Your data stays on this device.
Numbers use JavaScript decimal precision. Unsupported large integers are rejected; quote identifiers to keep all digits. Duplicate object names keep their last value. Transforms preserve data, not source whitespace or number spelling.
Paths use JSON Pointer: an empty path selects the root, ~0 escapes a tilde, and ~1 escapes a slash.
About this tool
Compare JSON finds the structural differences between two documents and reports them as readable before-and-after changes. It is useful for confirming what changed between two API responses or configuration revisions.
The comparison is structural rather than a text diff, so key order, formatting, and whitespace do not create noise. Everything is processed locally, and path filters let you ignore regions you do not care about.
How to use it
- Paste the first and second JSON documents.
- Run the comparison to see additions, removals, and changed values.
- Apply a path filter to focus on a branch of the document.
- Copy the change report for a review or issue.
Worked example
Before:
{"name":"Ada","roles":["admin","dev"],"active":true,"age":36}After:
{"age":"36","name":"Ada","roles":["dev","admin"],"email":"[email protected]"}The comparison reports five changes: /roles/0 changed from "admin" to "dev", /roles/1 from "dev" to "admin", /active was removed, /age changed from the number 36 to the string "36", and /email was added. The key order changed completely, but that is not reported, because objects are unordered in JSON.
What counts as a difference
Array positions matter: swapping two elements shows up as two changes, because many APIs treat array order as meaningful. A change of type, such as 36 becoming "36", is reported even though the values look alike. That is exactly the kind of difference that breaks strict clients and is invisible in a text diff.
Paths use JSON Pointer notation (RFC 6901): /roles/0 is the first element of roles. Filter the preview by path to focus on one part of a large document, such as /config. Typical uses are comparing API responses before and after a deployment, checking what an update changed in a configuration file, and reviewing fixtures in tests.
Frequently asked questions
Does key order or formatting matter?
No. The comparison works on the parsed structure, so reformatting or reordering keys does not register as a change.
How are arrays compared?
Arrays are compared by position and length, so an inserted item can shift the reported differences for later entries.
What is the limit?
Up to 1,000,000 characters across the compared documents.
Can I generate a JSON Patch from the report?
The report lists differences for review; it is not an RFC 6902 JSON Patch document. Its paths use the same pointer syntax, which makes a manual patch easy to write.
