JSON Diff Tool
Paste two JSON documents to see the differences. The diff lists every added, removed and changed value by path, ignores key order, and works on deeply nested objects and arrays.
How to compare two JSON documents
- Paste your original JSON into the A box.
- Paste the updated JSON into the B box.
- Read the color-coded changes: green added, red removed, amber changed.
Examples
A field changed and one was added
A: {"name":"Ada","age":30}
B: {"name":"Ada","age":31,"city":"London"}~ age: 30 -> 31 + city: "London"
Nested value changed
A: {"user":{"name":"x"}}
B: {"user":{"name":"y"}}~ user.name: "x" -> "y"
Frequently asked questions
What does a JSON diff show?
It shows every value that differs between the two documents: keys only in B are added, keys only in A are removed, and keys in both with a different value are changed. Each change lists its path and the old and new values.
How does it handle nested objects and arrays?
It compares recursively. Object keys are shown with dot notation like user.address.city and array elements use bracket notation like items[0]. Arrays are compared by index, so an element added or removed at the end shows up as added or removed.
Does key order matter?
No. Objects are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are treated as identical. Only the values matter, not the order they appear in.
What is this useful for?
Common uses include comparing two API responses, spotting unintended config changes, reviewing fixtures or snapshots, and confirming what a transformation actually changed in a payload.
Is my JSON sent to a server?
No. Both documents are parsed and compared entirely in your browser, so nothing leaves your machine.
What happens if one side is invalid JSON?
You get a clear error naming the side that failed to parse, either A or B, so you can fix the syntax before comparing.
Related tools
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
Diff Checker
Compare two texts or files side by side or unified, with word and character highlighting, ignore whitespace or case, collapse unchanged, and .diff export.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.