Free Online Utility • JSON Studio • RFC 8259 Engine

Compare JSON Arrays

Compare two JSON arrays to find items only in A (removed), only in B (added), common to both (intersection), and index-by-index differences.

Reference & JSON Spec RFC 8259
Added = B \ A  |  Removed = A \ B  |  Common = A ∩ B
Works identically on primitive arrays and arrays of objects!
Added (B \ A)New items in Array B
Removed (A \ B)Items dropped from A
Common (A ∩ B)Unchanged items
JSON ARRAY DIFF
Array Comparison Result

        
100% client-side RFC 8259 JSON Engine Instant

Session Calculation Log

No entries recorded in this session yet.

How Compare JSON Arrays Works

Compare JSON Arrays computes exact structural set differences between two JSON arrays — separating items added in B, removed from A, and common to both across strings, numbers, and nested objects.

JSON (JavaScript Object Notation, RFC 8259) is the universal structured data interchange format across REST APIs, microservices, configuration pipelines, and document databases. Every parsing, transformation, and serialization step in this utility runs completely client-side inside your browser with zero server uploads, guaranteeing instant turnaround and strict privacy even for sensitive payloads.

Structural Array Set Diffing

removed = [x in A : serialize(x) not in Set(B)]
added   = [x in B : serialize(x) not in Set(A)]
common  = [x in A : serialize(x) in Set(B)]

Immediately highlights list additions and deletions between API snapshots, permission lists, and allowlists.

Worked Reference Examples

InputOutputTechnical Note
["a","b","c"] vs ["b","c","d"]added:["d"], removed:["a"], common:["b","c"]Clear set diff
Object arraysStructural equalityDetects modified objects
Symmetric Diff["a","d"]Only non-matching items

Practical Developer & Data Engineering Workflows

Auditing Permission & Tag Lists

See which user roles or feature flags were added or revoked.

API Regression Diffing

Verify list endpoints return identical sets after refactoring.

Compatibility, Edge Cases & Best Practices

Switch Comparison Output to Symmetric Difference Only to get a single flat array of all non-shared items.

Copy verified outputs straight to your clipboard or download clean files ready for REST clients, CI/CD configs, database seeds, and unit test suites.

Frequently Asked Questions

Does this compare arrays of JSON objects as well as strings/numbers?
Yes — elements are compared structurally so identical objects match cleanly.
What is Symmetric Difference (A △ B)?
It returns all elements present in either Array A or Array B, excluding items shared by both.
Does element order affect Added/Removed detection?
No — set comparison detects genuine additions and removals regardless of ordering.