difference

JSON Diff

Compare two JSON documents side by side and see exactly which lines were added, removed, or kept. Uses the longest common subsequence algorithm for stable diffs. Runs entirely in your browser.

Paste two JSON documents to see a side-by-side diff.
difference

About JSON Diff

Performs a line-by-line diff of two pretty-printed JSON documents using the longest common subsequence algorithm. For plain text comparisons, use theDiff Checker, and validate either side with the JSON Formatter.

shield_lock

Secure & Private Client-Side

This tool runs entirely in your browser. No data is sent to any server, ensuring your information remains private and secure.

About JSON Diff

Compare two JSON documents side by side and see exactly which lines were added, removed, or kept. Uses the longest common subsequence algorithm for stable diffs. Runs entirely in your browser.

Frequently Asked Questions

How is the diff computed? expand_more

Both JSON documents are pretty-printed with two-space indentation, then compared line by line using the longest common subsequence algorithm for minimal, stable diffs.

Does the order of object keys matter? expand_more

Yes. JSON.stringify preserves insertion order, so the same data with reordered keys will appear as changed lines. Sort keys first with the [JSON Formatter](/tools/json-formatter/) if you want order-insensitive diffs.

Can I diff plain text instead? expand_more

Yes, use the [Diff Checker](/tools/diff-checker/) for plain text and source code comparisons.

Can I copy the diff? expand_more

Yes. Use the Copy diff button to copy all changed and unchanged lines to your clipboard.

Is my data private? expand_more

Yes. All diffing happens locally in your browser.

Common Use Cases

  • API Regressions: Compare two API responses before and after a deploy to spot unintended changes.
  • Config Audits: Diff two versions of a JSON config to confirm what changed.
  • Payload Reviews: Inspect test fixtures versus production data to find shape mismatches.
  • Schema Drift: Quickly identify new, removed, or renamed fields across releases.