JSON Compare: Find Differences Between Two JSON Files
Paste the original in A and the new version in B. Key order never matters, and arrays can be matched by an ID field instead of position, so a reordered list doesn't drown you in false changes.
How to Compare Two JSON Files
- Paste or upload the original JSON into A, and the new version into B.
- Choose how arrays should be matched — Smart (auto-detects an ID field), By position, Ignore order, or By key — and list any paths to ignore, like timestamps.
- Click "Compare" and review the summary, the change list, and export a JSON Patch or a report when you're done.
Features
- Semantic comparison — key order never counts as a difference
- Four array matching modes, including matching by an auto-detected ID so reordered lists don't produce false differences
- Ignore paths with wildcards (e.g.
$..updatedAt) to skip noisy fields like timestamps or request IDs - Numeric tolerance, case-insensitive and whitespace-trimmed string comparison, and optional type coercion
- "Compare keys only" mode for translation files — see exactly which keys are missing on each side
- Export a standard JSON Patch (RFC 6902), self-checked by re-applying it to A and confirming it equals B
- Export a Markdown or CSV change report
- Runs entirely in your browser — no signup, no data sent anywhere
Why array order causes false differences
A line-by-line text diff treats JSON as text, so reformatting, key order, and whitespace all show up as noise. A semantic diff parses both sides and compares the data instead: objects are unordered maps, so key order never matters, but arrays are trickier — many real-world arrays are actually lists of records with an ID (users, orders, permissions), and comparing them strictly by position turns a single inserted record into dozens of "changed" lines. Matching array elements by key (or automatically via Smart mode) fixes this.
How to ignore timestamps and other noise
Add a pattern like $..updatedAt to "Ignore paths" to skip a field wherever it appears, or $.meta.requestId to skip one specific path. This is useful for API regression testing, where timestamps and request IDs change on every call but aren't meaningful differences.
JSON Patch, explained
JSON Patch (RFC 6902) is a standard list of operations — add, remove, replace — that transforms the first document into the second. Export it here and apply it programmatically wherever your code already supports the standard.
For formatting and validating a single JSON document, use the JSON Formatter. For other structured-data conversions, try CSV to SQL or Base64 Encoder.
Frequently Asked Questions
Does key order matter when comparing JSON?
{"a":1,"b":2} and {"b":2,"a":1} are identical.How do I compare arrays whose order changed?
id, so a reordered list only shows real changes.Can I ignore fields like timestamps?
$..updatedAt under "Ignore paths".