Diff Checker

Compare two texts and highlight the differences.

How to Read the Diff

Paste the original text on the left and the modified version on the right. The checker compares them line by line and renders a unified, git-style result: lines only in the modified text get a green +, lines only in the original get a red −, and unchanged lines stay plain. A summary chip shows the totals at a glance — for example +3 −1 ~42 means 3 additions, 1 removal, 42 untouched lines.

Example — original:

host: localhost
port: 8080
debug: true

modified:

host: localhost
port: 3000
debug: true

The diff flags exactly one pair: - port: 8080 and + port: 3000. The other lines match and stay neutral.

What It's Good For

  • Config files: spot the one changed value between a working and a broken .env or YAML file.
  • Code snippets: the output uses a monospace font and +/− notation, so it reads like a git diff.
  • Documents and contracts: verify what actually changed between "final" and "final_v2".
  • API responses: compare two JSON payloads — run both through the JSON formatter first so identical data formats identically, otherwise whitespace differences drown out real changes.

Line-by-Line: What That Means

The comparison is positional — line 1 against line 1, line 2 against line 2, and so on. That makes it fast and predictable, with one consequence to know about: inserting a line near the top shifts everything below it, so subsequent identical-but-moved lines are reported as changed pairs. For the cleanest diff, compare versions where lines stay in place (config edits, value changes, translations) or remove the inserted lines before comparing.

Practical Tips

  • Normalize first: trailing spaces and mixed tabs/spaces count as differences. If a line "looks identical" but is flagged, invisible whitespace is almost always the culprit.
  • Watch case: the comparison is case-sensitive — Truetrue. Level the casing with the case converter if it shouldn't matter.
  • No size limit: the diff runs entirely in your browser, so texts with thousands of lines work fine and your data never leaves your device — safe for contracts, credentials-adjacent configs, and unreleased code.

Frequently Asked Questions

How does the diff checker compare texts?
Line by line, positionally: line N of the original against line N of the modified text. Matching lines render neutral; differing lines appear as a red removal plus a green addition, with running totals shown above the output.
Why are identical-looking lines marked as different?
Usually invisible characters — trailing spaces, tabs vs. spaces, or different casing. The comparison is exact and case-sensitive. Also, an inserted line shifts everything after it, marking moved lines as changed.
Can I compare code or JSON?
Yes — the monospace, +/− output is built for it. For JSON, format both payloads in the JSON formatter first so identical data serializes identically and only real differences show.
Is there a limit on text size?
No hard limit. The comparison runs locally in your browser, so performance depends on your device — texts with thousands of lines compare instantly on modern hardware.
Is my text kept private?
Yes. Both texts are compared entirely in your browser and are never sent to a server — nothing is stored, logged, or transmitted.