Compare JSON Files Online
Compare two JSON files or pasted file contents locally in your browser, then review a readable field-level diff.
Paste your JSON → Get results instantly (no signup)
→ Compare these JSON inputs and return a report of changed, added, and removed fi...
1{2 "changed": [3 {4 "kind": "changed",5 "path": "plan",6 "before": "starter",7 "after": "pro"8 },9 {10 "kind": "changed",11 "path": "features.aiDraft",12 "before": false,13 "after": true14 },15 {16 "kind": "changed",17 "path": "limits.documents",18 "before": 10,19 "after": 10020 }21 ],22 "added": [23 {24 "kind": "added",25 "path": "features.apiAccess",26 "value": true27 }28 ],29 "removed": [30 {31 "kind": "removed",32 "path": "features.legacyExport",33 "value": true34 }35 ]36}Love the result?
Use this exact pipeline in your app, backend, or LLM workflow.
No setup needed. Works with curl, Node, Python.
Uses example data. For edited input, copy from the playground.
Works with:
- Local JSON files
- Export snapshots
- Config files
- Fixture comparisons
Example: input → output
Compare JSON files online
Compare JSON files online when you need to review two saved payloads, exported configs, fixtures, snapshots, or API examples without writing a script. Paste the contents of each file into the tool, run the comparison, and review a structured report of what changed.
This file-focused workflow is useful because JSON files often contain large nested objects. A raw line comparison can be noisy after formatting, minification, or key sorting. A structured file comparison parses the contents first and then reports differences by object path.
If you want the canonical tool page, use the JSON diff comparison tool.
File comparison workflow
Start with the older file, expected fixture, or production export on one side. Put the newer file, actual fixture, or staging export on the other. Run the diff, then check whether the changed paths match what you expected.
For example, a config file review might show that features.billing was added, limits.projects changed from 5 to 20, and deprecatedMode was removed. That is more actionable than a long visual block showing braces, indentation, and surrounding unchanged fields.
Best practices before comparing files
Validate both files first if they were hand edited. JSON copied from comments, logs, or documentation can contain trailing commas, unquoted keys, or single quotes that are not valid JSON. The JSON Validator catches those errors before comparison.
Clean both files if one was minified and the other was pretty-printed, or if one export includes empty fields that the other omits. Use Clean JSON for cleanup and Normalize JSON when the same concept appears under different key names.
Flattening can also help with very deep files. Flatten JSON converts nested structures into readable paths, which makes large config comparisons easier to scan.
Common file comparison cases
Use this page for environment config review, package export checks, API fixture drift, backup comparison, release QA, generated sample review, and migration verification. It is also helpful when a teammate sends two JSON files and asks what changed but the change is buried several levels deep.
The comparison runs in the browser. That makes it convenient for local files, sensitive fixtures, and one-off reviews where installing a package would slow you down.
Related conversions
- JSON Diff Tool - canonical structured diff workflow for added, removed, and changed fields.
- JSON compare tool online - compare objects, arrays, files, and API payloads by path.
- JSON difference checker - changed-field reporting for debugging payload drift.
- JSON diff online - browser-based no-upload JSON comparison.
- API JSON diff - compare endpoint, webhook, and SDK response changes.
- Compare JSON objects - object-level field comparison.
- JSON file diff - saved-file and fixture diff workflow.
- Find JSON changes - added, removed, and modified field detection.
- Compare API JSON responses - endpoint and webhook response comparison.
Related tools
- JSON Validator - check file contents before running a comparison.
- JSON Formatter - clean and format pasted file contents before diffing.
- Clean JSON - standardize pasted file contents before diffing.
- Flatten JSON - turn nested file structures into readable paths.
- Normalize JSON - reduce field-name drift between exports.
- JSON to CSV - move selected file data into spreadsheet review.
Related tools
- JSON ValidatorCheck JSON syntax before comparing two files or API responses
- JSON FormatterClean and format JSON before diffing, validation, or conversion
- JSON to CSVConvert JSON array row data into final CSV text output
- Clean ValuesClean noisy JSON by removing nulls, empties, duplicates, and other low-value clutter
- Flatten / NestConvert nested JSON objects, arrays, and API responses into flat key paths or rebuild them using delimiter and casing rules
Related comparisons
Read more on the blog
Advanced usage (optional)
JSON Diff / Change Report
v1.0.0Description
JSON Diff / Change Report
Compare two JSON inputs and output a structured report or focused diff subset. Accepts a primary input (the new JSON) and secondary input (the old JSON), then shows what changed, was added, or was removed between them.
How It Works
This utility requires two inputs — primary (the "new" version) and secondary (the "old" version). It performs a deep comparison and outputs results based on the selected mode.
Diff Modes
Report
Return a structured report with changed, added, and removed arrays. Entries include dot paths, kind, and either before/after values or the added/removed value.
Changed Only
Return the subset of the new JSON that differs from the old JSON. Modified and added fields are included; removed fields are excluded because they do not exist in the new JSON.
Added Only
Show only fields that exist in the primary input but not in the secondary. Useful for detecting new additions.
Removed Only
Show only fields that exist in the secondary input but not in the primary. Useful for detecting deletions.
Full Annotated
Show all fields with _diff_ markers indicating their status: "unchanged", "changed", "added", or "removed". Provides a complete picture of all differences.
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
| Diff Mode | enum | report | report, changed-only, added-only, removed-only, or full-annotated |
Use Cases
Version Comparison
- Config changes: Compare two versions of a configuration file to see what changed
- API responses: Diff API responses before and after a deployment
- Schema evolution: Identify added or removed fields between schema versions
Data Validation
- Migration verification: Compare source and target data after migration
- Sync detection: Find out-of-sync records between two data sources
- Audit trail: Track exactly which fields were modified in an update
Debugging
- State inspection: Compare application state before and after an action
- Response diffing: Compare expected vs. actual API responses
- Regression detection: Identify unexpected changes in output data
Configuration
| Name | Type | Default | Description |
|---|---|---|---|
| Diff Mode | enum | report | report: return changed, added, and removed entries with paths. changed-only: show the new JSON subset with modified and added values. added-only: show only new keys. removed-only: show only deleted keys. full-annotated: show all with _diff markers.
report changed-only added-only removed-only full-annotated |
Examples
Compare these JSON inputs and return a report of changed, added, and removed fields.1{2 "changed": [3 {4 "kind": "changed",5 "path": "plan",6 "before": "starter",7 "after": "pro"8 },9 {10 "kind": "changed",11 "path": "features.aiDraft",12 "before": false,13 "after": true14 },15 {16 "kind": "changed",17 "path": "limits.documents",18 "before": 10,19 "after": 10020 }21 ],22 "added": [23 {24 "kind": "added",25 "path": "features.apiAccess",26 "value": true27 }28 ],29 "removed": [30 {31 "kind": "removed",32 "path": "features.legacyExport",33 "value": true34 }35 ]36}API Usage
curl -X POST https://your-domain.com/api/v1/utilities/compare.json-diff \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":{"plan":"pro","features":{"aiDraft":true,"history":true,"apiAccess":true},"limits":{"documents":100}},"secondary":{"plan":"starter","features":{"aiDraft":false,"history":true,"legacyExport":true},"limits":{"documents":10}}},"config":{"mode":"report"}}'1{2 "changed": [3 {4 "kind": "changed",5 "path": "plan",6 "before": "starter",7 "after": "pro"8 },9 {10 "kind": "changed",11 "path": "features.aiDraft",12 "before": false,13 "after": true14 },15 {16 "kind": "changed",17 "path": "limits.documents",18 "before": 10,19 "after": 10020 }21 ],22 "added": [23 {24 "kind": "added",25 "path": "features.apiAccess",26 "value": true27 }28 ],29 "removed": [30 {31 "kind": "removed",32 "path": "features.legacyExport",33 "value": true34 }35 ]36}