JSON Diff Checker
Paste two JSON documents to compare them field by field. Added, removed, and changed values are colour-coded — everything runs in your browser, so your data never leaves your machine.
About JSON Diff Comparison
Comparing two JSON documents by hand is slow and error-prone, especially when objects are deeply nested or arrays are long. A JSON diff tool walks both structures key by key and index by index, then reports exactly what changed: which fields were added, which were removed, and which values were modified. This is invaluable when reviewing API responses, debugging configuration drift, verifying data migrations, or checking what a code change did to serialized output.
How to Read the Diff:
- Added (+): Keys or values present in the right (changed) document but not in the left (original).
- Removed (-): Keys or values present in the left document but missing from the right.
- Changed (~): Keys that exist in both documents but whose values differ — shown as
old → new. - Unchanged: Identical entries, dimmed for context so you can see where changes sit within the structure.
Common Use Cases:
- API Debugging: Compare an expected response against an actual one to spot regressions.
- Config Review: See exactly what changed between two versions of a settings file.
- Data Migration: Verify that transformed records match the source before and after a migration.
- Code Review: Understand how a change affected serialized JSON output.
Key Order Does Not Matter — Array Order Does
Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are equal. That is correct: JSON objects are unordered, and a plain text diff would wrongly flag the whole block as changed simply because a serializer emitted the keys differently.
Arrays are the opposite — they are compared by position, because order is part of an array's meaning. This is the single most common source of confusing output. If a collection endpoint returns the same records in a different sequence, a positional comparison reports nearly every element as changed even though the set is identical.
When ordering is incidental rather than meaningful, turn on Ignore array order. Elements are then matched by value instead of by position, at every level of nesting, so [1024, 1204] and [1204, 1024] compare as identical. It stays off by default because silently ignoring order would give a wrong answer for data where order carries meaning — a sequence of events, a ranked list, an ordered pipeline. Note that it ignores order, not contents: a missing element, an extra one, a changed value, or a different number of duplicates is still reported.
Reading Results Without Being Misled
- Type changes are real changes.
"1"and1differ. This catches a whole class of serialization bugs where a numeric field silently starts arriving as a string. null,"", and a missing key are three different things. A removed key means the field is gone; a changed value ofnullmeans the field is present and explicitly empty. APIs and validators frequently treat these differently.- Expect volatile fields to differ. Timestamps, request IDs, trace headers, and signed URLs change on every call. Learn to skim past them so real differences stand out.
- Floating-point values may differ in the last digits across languages and runtimes without either being wrong. Money should be an integer count of minor units or a string, never a float.
A Practical Debugging Recipe
When a request works in one environment and fails in another, capture both full responses, paste them side by side here, and read the diff before reading any code. The difference is usually a single field — a feature flag, a missing scope, a version string, a null where an object was expected. This turns an open-ended "why is staging different" question into a specific one, and it typically takes under a minute.
If either document will not load, it may not be valid JSON at all — run it through the JSON Formatter & Validator first to get a precise syntax error. For comparing files that are not JSON — YAML, nginx configs, .env files, log excerpts — use the File & Text Diff Checker, which compares line by line instead of key by key.
Privacy
Both documents are parsed and compared in your browser. Nothing is uploaded, stored, or tracked — which is what makes it safe to paste a production response containing customer data or an authorization header, the exact material that should never go into a server-backed diff tool.
Related Tools
JSON Formatter & Validator
Beautify, validate, and format JSON data with syntax highlighting. Ideal for debugging and data visualization.
File & Text Diff Checker
Compare two text files or blocks of text line by line. Highlight added, removed, and changed lines — ideal for config review, log analysis, and code review.
Timestamp to Date Converter
Convert Unix timestamps to human-readable dates and vice versa. Essential for log analysis and time-based data.
Hash Generator
Generate SHA-1, SHA-256, and SHA-512 hashes from any text for checksums, data integrity verification, and security testing.