How to Compare JSON Files Online
JSON appears in API responses, configuration files, package manifests, test fixtures, and data exports. A useful comparison should first tell you whether each document is valid, then make formatting noise small enough that the real changes are easy to inspect.
Common JSON Comparison Tasks
- Compare API responses from development, staging, and production.
- Review edits to configuration or package manifest files.
- Check a data transformation against an expected fixture.
- Investigate a changed nested value without sending the payload to a server.
Format, Validate, Then Compare
- Open the JSON Diff Checker.
- Paste the original and changed documents, or use the local file buttons above the editors.
- Select Format & validate on each side. Invalid JSON stays in the editor and the browser reports the parse error instead of producing a misleading diff.
- Select Find Differences. The structural view reports added, removed, modified, and type-changed values by JSON Pointer path.
- Filter or search changed paths, inspect before-and-after values, and copy or download the JSON Patch. Switch to Raw text when whitespace or source order matters.
Formatting parses each value and serialises it with consistent indentation. That can remove whitespace noise before raw-text review, while the default structural result compares parsed values and types directly.
Textual Diff Versus Structural Diff
DiffPeek opens a structural comparison first. Object properties are matched by name, so whitespace and object key order do not create structural changes. Arrays are ordered and compared by numeric index; inserting an item near the beginning can therefore produce several changed paths.
The optional raw-text view shows what the documents literally contain, including formatting and key-order changes. DiffPeek validates JSON syntax, but it does not perform JSON Schema validation, numeric tolerances, ignored-path rules, or identity-based array matching.
Important JSON Edge Cases
- Duplicate keys: JSON should not rely on them. Formatting parses and serialises the document, so a parser may retain only the last duplicate value.
- Large documents: the structural engine stops beyond 160 nested levels, 100,000 visited nodes, or 10,000 changes. Raw-text input also has 10 MB/100,000-line safety limits.
- Generated files: property order is ignored structurally, but do not reorder arrays unless their application semantics allow it.
- Secrets: comparison content stays on the device, but you should still use a trusted browser profile and follow your organisation's endpoint policy.
What Leaves the Browser?
The JSON text and rendered diff are processed locally and are not uploaded to DiffPeek. Optional aggregate analytics remain off until you allow them and never include the pasted value, a filename, a path, or an individual diff line.
Compare JSON Now
Format, validate, and inspect JSON locally with no account required.
Open JSON Diff Checker