JSON Diff — Compare JSON
Without Uploading It
Semantic diff that understands structure, not just text. Key order ignored. Additions, deletions and changes highlighted instantly.
What Is a JSON Diff Tool?
A JSON diff tool compares two JSON documents to identify what changed — additions, deletions, and modifications — displayed in a readable highlighted format. Unlike plain text diff tools, a semantic JSON diff understands the structure of the data, meaning key order does not matter and nested objects are compared correctly.
This is essential when debugging API response changes, comparing config files across environments, verifying data migration output, or reviewing what a feature flag actually changed in a JSON payload. For plain text, code or log comparison use the Text Diff tool.
Semantic JSON Diff vs Plain Text Diff
| Scenario | Plain Text Diff | Semantic JSON Diff |
|---|---|---|
| Keys in different order | Reports as changed ✗ | Correctly identical ✓ |
| Whitespace / formatting | Reports as changed ✗ | Ignored ✓ |
| Nested object changes | Shows raw text lines | Shows exact changed keys ✓ |
| Array element added | Shows full array as changed | Shows only new element ✓ |
| Type change (string → number) | May not detect reliably | Detected and flagged ✓ |
Common Use Cases
| Use Case | What You're Comparing | Safe to Use Here? |
|---|---|---|
| API response debugging | Before/after response payloads | ✓ Yes — client-side |
| Config file comparison | dev.json vs prod.json | ✓ Yes — nothing uploaded |
| JWT payload comparison | Two decoded JWT payloads | ✓ Yes — combine with JWT tool |
| Data migration verification | Source vs destination records | ✓ Yes |
| Feature flag auditing | Flag config before/after deploy | ✓ Yes |
FAQ
Does key order matter? +
No. Semantic comparison means {"a":1,"b":2} and {"b":2,"a":1} are identical. Only actual value differences are highlighted.
Is it safe to compare JSON containing secrets? +
Yes. Nothing is uploaded. All comparison runs in your browser. Your API keys, passwords or sensitive config values never leave your device. Verify this yourself with DevTools — zero network requests fire during comparison.
Can I compare large JSON files? +
Yes, within browser memory limits. Files up to a few MB work comfortably. For very large files (over 10 MB), split the JSON into smaller objects first to improve performance.
Can I compare JSON arrays? +
Yes — the diff library handles arrays, nested objects, and all valid JSON types. Mixed-type comparisons (string vs number for the same key) are flagged as changes.
How do I compare two JWT payloads? +
Decode each token with the JWT Decoder, copy the payload JSON from each, then paste them into the left and right panels here.
What if I want to compare plain text, not JSON? +
Use the Text Diff tool — it compares any text line by line and works with code, logs, config files, CSV and markdown.
Compare Your JSON Now
Paste both files above. No account. No uploads. Works on any device.
↑ Back to Tool