About the JSON Diff Checker
When an API response changes or a configuration file stops working, a plain text comparison of JSON is noisy because key order and spacing differ. This JSON diff checker compares the two documents by meaning and lists every added, removed and changed value with its exact path and the old and new values, so the real differences stand out. It is useful for reviewing API changes, debugging settings and checking data migrations.
Because the comparison works on the parsed data, formatting and key order are ignored. An object written on one line and the same object pretty-printed with its keys in a different order count as identical. That makes it far more useful than a plain text diff for API responses, configuration files and test fixtures, where a reformatted file would otherwise look completely different.
Two options handle common cases. Ignore array order treats arrays as collections, so a list of 1 and 2 matches a list of 2 and 1, which suits tags, roles or IDs. Ignore case in strings treats Paris and PARIS as equal. Type changes, such as a number that became a string, are flagged clearly, because they often break the code that reads the data.
Copy the list of differences as a plain text report for a code review or a bug ticket. Everything runs in your browser. For line-by-line comparison of any text, use the text diff checker; to explore a document as a tree, the JSON viewer; and to tidy JSON before sharing it, the JSON formatter.
How to use the JSON Diff Checker
- Paste the originalPaste or open the first JSON document on the left.
- Paste the changed versionPaste or open the second document on the right; the comparison runs as you type.
- Choose optionsTick Ignore array order or Ignore case in strings if they suit your data.
- Review and copyRead the added, removed and changed paths, then copy the report.
JSON Diff Checker features
- Semantic comparison of parsed JSON
- Ignores formatting and key order
- Added, removed and changed values by path
- Old and new values side by side
- Type changes flagged
- Optional: ignore array order or string case
- Copy a plain text report
- Runs in your browser; nothing is uploaded
Common uses
- Checking what changed between two API responses
- Reviewing configuration changes before a deploy
- Comparing test fixtures and snapshots
- Spotting differences between environments
- Verifying data migrations and exports
Comparing JSON in practice: API changes that break apps, snapshot tests, configuration drift and missing Urdu translations
Comparing JSON by meaning rather than text answers questions developers face every week: what changed in this API response, why does staging behave differently from production, and which translation keys are missing. This guide works through comparing an API response before and after a backend update, explains which differences break clients, and covers test snapshots, configuration drift, translation files and lists of objects.
A worked example: an API update
A product endpoint is compared before and after a backend release. The diff shows three changes: price changed from the number 1250 to the string "1250", the stock field was removed and a new discount field was added. The type change and the removal are breaking changes, because apps expecting a number or relying on stock will fail. The new discount field is usually safe, as well-written clients ignore fields they do not know.
Which changes break clients
- Removed fields break code that reads them.
- Type changes break calculations and validation.
- Renamed fields appear as a removal plus an addition and break like removals.
- Added fields are normally safe.
- Changed values are expected, unless they change meaning, such as amounts switching to a different unit.
Sorting a diff report into these categories turns a list of differences into a release decision.
Snapshot tests
Many test suites save an expected JSON response and compare each new response with it. Volatile values, such as timestamps, generated IDs and request IDs, change on every run and create noise. Removing or replacing them with fixed placeholders before comparing leaves only meaningful differences, so a failing test points straight at a real change.
Configuration drift
Staging and production configurations slowly drift apart as settings are changed in one place and not the other. Comparing the two configuration files reveals differences in feature flags, limits and service addresses. Some differences are intended, such as database addresses, while others explain bugs that only happen in one environment.
Missing translations
Apps with English and Urdu interfaces often keep translations in JSON files with the same keys and different text. Every value differs, as expected, but the useful information is in the keys: those added in English and missing from Urdu show text that will appear untranslated. Checking for added and removed keys before each release keeps both languages complete.
Lists of objects
Ignoring array order works well for simple lists such as tags. For lists of objects, such as order items, sort both documents by a stable ID first, so each item is compared with its counterpart rather than with whatever sits in the same position. Otherwise a single inserted item makes every following item appear changed.
Numbers that look different
Because the comparison works on parsed values, 1 and 1.0 count as the same number, and formatting differences disappear. Calculated values may still differ in tiny ways, such as 0.30000000000000004 instead of 0.3, because of how computers store decimals. Rounding amounts consistently before storing or comparing them avoids these false alarms.
Common mistakes
- Treating type changes as harmless.
- Comparing snapshots containing timestamps and generated IDs.
- Comparing lists of objects without aligning them by ID.
- Comparing translation values instead of translation keys.
Related tools
To sort keys or arrays before comparing, use JSON Sorter. To compare YAML configuration, convert it first with YAML to JSON Converter, and to describe a response's structure in code, JSON to TypeScript.
Null versus missing
A field set to null and a field that is absent are not the same, and the diff shows them differently. Some systems treat them differently too: in an update request, a missing field may leave the stored value unchanged, while null may erase it. Checking which one a change introduces avoids accidentally wiping data.
Package manifests
Comparing a project's package manifest before and after an upgrade lists every dependency whose version changed. Major version jumps, such as from 4 to 5, often include breaking changes and deserve a look at the library's release notes. Minor and patch updates are usually safe but still worth testing.
Changelogs for app developers
Mobile apps cannot update instantly, and older versions stay in use for months. Keeping a diff report for every API change gives app developers a precise changelog of added, removed and changed fields. It also shows the backend team which changes would break older app versions still in circulation.
Comparing data between systems
The same product catalogue often lives in two places, such as a shop's own system and a marketplace listing. Exporting both as JSON and comparing them, after aligning products by ID, reveals mismatched prices, stock levels and descriptions before customers notice them.
Comparing exports over time
Saving a JSON export of important settings or reference data each month, and comparing it with the previous one, gives a simple audit trail. Unexpected differences, such as a changed tax rate or a removed delivery zone, stand out immediately. This is a lightweight way to notice changes made by other people or by automated processes without anyone announcing them.
Privacy
Both documents are compared in your browser. Nothing is uploaded or stored.
Further reading: JSON for Beginners: Syntax, Common Errors and Formatting.
Frequently asked questions
How is this different from a text diff?
A text diff compares lines, so reformatting the file or reordering keys makes everything look changed. This tool parses both documents and compares the data itself, so it only reports real differences in values and structure.
Does key order matter?
No. JSON objects are unordered by definition, so an object with the keys a and b is identical to one with b and a. Array order does matter by default, because the position of items in an array is usually meaningful.
What does Ignore array order do?
It compares arrays as collections: every item in one array is matched with an equal item in the other, wherever it is. Items without a match are listed as removed or added. Use it for lists such as tags, roles or IDs.
How are paths written?
Paths start with $ for the whole document, followed by .key for object keys and [n] for array positions counted from zero, for example $.users[2].email. Keys with spaces or symbols are written in brackets and quotes.
Why is a change marked as a type change?
Because the value changed type, for example from the number 5 to the string 5, or from an object to null. Such changes often break code that expects the original type, so they are labelled separately.
Can I compare large files?
Yes. Documents of several megabytes compare in a moment in modern browsers. If there are more than 1,000 differences, the first 1,000 are listed on the page, while the summary and the copied report include them all.
Is my data uploaded?
No. Both documents are parsed and compared by code running in this page on your own device. Nothing is sent to a server or stored, so it is safe to compare private API responses and configuration files.