Online Diff Viewer — Compare Text Side by Side

Paste two versions of anything — JSON, SQL, config — and see what actually changed. Auto-beautified first.

convert² THE BEAUTIFIER
Enter format · K copy
INDENT
Input · raw
0 B 0 ln
1
Output · formatted
0 B 0 ln
{ }
awaiting input
paste code on the left
pick a format above
Original · A
0 B
Removed raw
Added
Original · B
0 B
↓ About this tool

Online Diff Viewer — Compare Text Side by Side

Paste two versions of anything — JSON, SQL, config — and see what actually changed. Auto-beautified first.

What it does

Diff tools show what changed between two versions of a text. For developers the catch is whitespace: if one JSON is minified and the other is pretty-printed, a naive line-diff reports every line as different even though the semantics match perfectly.

convert2's diff viewer auto-detects the format (JSON, XML, HTML, CSS, SQL, YAML, JWT), beautifies both sides with the same settings, and only then compares. What you see is the actual change, not whitespace noise.

When the content isn't a recognised format — plain text, code, CSV — it falls back to raw line-level comparison. If one side fails to parse as the detected format, both sides are compared as raw text so the result stays honest.

How to use it

  1. Switch to Diff mode using the toggle in the top-left (next to the Beautifier tab).
  2. Paste the first version into the Original · A pane.
  3. Paste the second version into the Original · B pane.
  4. As soon as both sides have content, the layout expands to four columns: originals on the outside, colored diff views in the middle.
  5. Scroll the diff columns — they're synchronised. Click SWAP A ↔ B if you pasted them in the wrong order.

Example

Input
{"version":"1.0","active":true,"port":3000}
Output
{
  "version": "1.1",
  "active": true,
  "description": "the beautifier"
}

Why convert2

  • Semantic, not syntactic. A minified vs pretty-printed pair diffs on content, not whitespace.
  • Format-aware. Detects JSON, XML, HTML, CSS, SQL, YAML, JWT from content shape.
  • Side-by-side layout. Removed on one side, added on the other, aligned.
  • Context folding. Long runs of unchanged lines collapse so the actual changes are in focus.
  • Share links. Send a teammate a comparison URL that restores both inputs — great for PR discussions.

Common use cases

  • Comparing an API response before and after a deploy to spot regressions.
  • Reviewing config file changes between environments (staging vs production values).
  • Diffing two SQL query variants to understand which clauses changed.
  • Comparing two JWT payloads to see how claims shifted between requests.
  • Checking what a code generator output changed after a template update.

Diff Viewer specifics

  • Uses the diff library (jsdiff) for line-level comparison with smart context folding.
  • Auto-format detection lives in formatForDiff() and falls back to raw when the detected format can't be parsed.
  • Empty sides are allowed — the UI will tell you which pane is waiting for input.
  • Long unchanged runs are collapsed with a ··· N unchanged lines ··· marker to keep the focus on changes.

Frequently asked questions

Does it work with minified code?

Yes. The diff viewer auto-formats both sides before comparing, so a minified JSON and a pretty-printed one will diff semantically.

Can I compare two JSON documents?

Yes. Paste them side by side — the diff shows semantic changes, not whitespace noise.

What if one side is invalid JSON / XML / whatever?

When a side can't be parsed as the detected format, both sides are compared as raw text. The format badge in the Removed column turns yellow with the label invalid, so you know the semantic mode isn't active.

Is it free?

Yes, completely free. Works offline after the first load.

Can I share the comparison?

Yes — click SHARE and the URL will restore both sides plus the diff mode for whoever opens it.

Other tools

copied