Validate

Diff two JSON arrays by key to detect added, removed, and modified records

Diff two JSON arrays to find added, deleted, and modified records based on a shared key.

🛡️ Your rows never leave your browser.
Why Onfyt: Matches records by primary key to perform semantic diffs that ignore cosmetic line order and key sequence differences.

Interactive Sample Data

idstatusdiff_typechanges
101activeMODIFIEDprice: 25.00 -> 30.00
102pendingREMOVEDrecord deleted in Array B
103activeADDEDnew record in Array B

How this tool works

When deploying updates to microservices, auditing database migrations, or reconciling inventory exports between environments (e.g. Staging vs Production), engineers need to know exactly what changed between two versions of a JSON array. Text-based diff tools (like standard git diff) fail miserably on JSON datasets because array objects can appear in different orders, or keys can be serialized in different sequences. Two JSON arrays might be semantically 100% identical, but a text diff flags every single line as changed simply because Array B sorted objects differently. DataFix performs semantic, object-level JSON diffing. You designate a primary key (such as 'id', 'sku', or 'email'). The engine index-matches records between Array A and Array B, regardless of array ordering or key serialization order. It outputs a clear delta report: records added in B, records deleted from A, and records where specific attributes changed, highlighting the exact old and new values. Auditing configuration drifts, database sync differences, and API response changes requires comparing two JSON arrays to find added, modified, or removed records. DataFix performs deep structural comparison between two JSON payloads, highlighting differences at the property level with full visual clarity.

Things that usually go wrong

  • Keys must be unique within each array for the comparison to be meaningful — deduplicate both arrays first.
  • Arrays with no matching key fields produce a 'no matches' report.

Edge cases we tested

🧪 Differing array order with identical content

Correctly evaluated as 0 differences because objects match on primary key.

🧪 Deep nested object property changes

Pinpoints the exact nested path (e.g. 'user.address.zip') that changed.

🧪 Type mutations (number 100 vs string '100')

Flagged as modified with type change indicator.

Frequently Asked Questions

What does the 'changed' category show?

Records that exist in both arrays under the same key but have at least one different field value. The changed fields are listed.

Can I compare deeply nested objects?

Yes — nested fields are compared by deep equality.

Related tools

Validate

Validate CSV

Audit CSV files for structural errors, encoding problems, and row-length inconsistencies.

Open Tool →
Validate

Validate JSON

Parse and validate JSON strings to expose syntax errors at exact line and column positions.

Open Tool →
Validate

Find Duplicate Rows

Identify and count duplicate rows in CSV files by exact match or by key column selection.

Open Tool →