JSON & Text Diff

JSON & Text Diff compares two blocks of text line by line in your browser, with an optional JSON-formatting pass so reformatted JSON diffs clean.

Original

Changed

At a glance

Accepts
Two blocks of text or JSON you paste
Outputs
A line-by-line diff with additions and deletions highlighted
Where it runs
Entirely in your browser, on your device
What leaves your device
Nothing - what you type stays in this tab
Limits
5,000 lines per side; the diff algorithm is quadratic in line count
Account
Not required - there is no sign-up
Price
Free, with no watermark and no usage cap

JSON & Text Diff compares two blocks of text line by line and highlights exactly what was added or removed, using a standard longest-common-subsequence diff - the same category of algorithm behind `git diff`, run entirely in your browser. The optional JSON mode pretty-prints both sides first, so a reformatted JSON document diffs clean instead of showing every line as changed just because the indentation moved.

How to use it

  1. Paste the original version on the left, the changed version on the right.
  2. Turn on "Format as JSON first" if you're comparing JSON and want formatting differences ignored.
  3. Click Compare to see additions and deletions highlighted.

Frequently asked questions

Is either text sent anywhere to compare them?

No - the comparison runs entirely in your browser with a line-by-line diff algorithm. Nothing you paste is sent to a server.

What does "Format as JSON first" actually do?

It runs JSON.parse then JSON.stringify(..., null, 2) on both sides before diffing, so differences in whitespace, indentation, or key spacing disappear and only real content changes show up. It doesn't reorder object keys or detect that two differently-ordered objects are semantically equal - it's a formatting normalizer, not a deep structural diff.

What happens if my JSON doesn't parse?

You'll see a clear error naming which side failed and why, and the raw text diff still runs underneath - turning the toggle off (or fixing the JSON) gets you back to comparing exactly what you pasted.

Is this a merge tool - can I combine both versions?

No - this only shows what changed, line by line. There's no three-way merge or conflict resolution; for that you'd want a version control tool, not this.

Is there a size limit?

The diff algorithm is quadratic in line count, so very large pastes (over 5,000 lines on either side) are blocked with a message rather than left to freeze the tab. Most real files are well under that.