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.

Original (A)
Modified (B)

How to Compare Two JSON Files

  1. Paste or upload the original JSON into A, and the new version into B.
  2. 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.
  3. Click "Compare" and review the summary, the change list, and export a JSON Patch or a report when you're done.

Features

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? +
No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are identical.
How do I compare arrays whose order changed? +
Use "Smart" or "By key" array matching. Elements are matched by an ID such as id, so a reordered list only shows real changes.
Can I ignore fields like timestamps? +
Yes. Add paths such as $..updatedAt under "Ignore paths".
Is my JSON uploaded? +
No. Both files are compared inside your browser; nothing is sent to a server.
What is JSON Patch? +
A standard (RFC 6902) list of operations that turns the first document into the second. You can export it and apply it in code.