✍️ Text & Writing

Diff Checker – Compare Text

Paste two versions and instantly see exactly what changed.

  • Line + wordlevel differences
  • LCSgit-style algorithm
  • Ignorecase or spaces
  • Summaryadded · removed · changed

How to use the Diff Checker (Text Compare)

  1. 1

    Paste the original

    In the left box.

  2. 2

    Paste the new version

    In the right box.

  3. 3

    Choose options

    Ignore case or extra whitespace if they don’t matter.

  4. 4

    Read the differences

    Red lines removed, green lines added, changed words highlighted.

Features

Removed lines

Shown in red with a minus.

Added lines

Shown in green with a plus.

Word highlights

The exact words changed inside a line.

Summary

Counts of added, removed and changed lines.

Ignore options

Case and whitespace.

Private

Your text stays in your browser — nothing is uploaded or stored online.

Who uses it — and for what

Contracts

Spot changed clauses between drafts.

Essays

See what an editor or AI rewrote.

Code and config

Compare snippets and settings.

Translations

Check revised translations.

How to read the result

Lines that exist only in the original are shown in red with a minus sign; lines that exist only in the new version are green with a plus sign. When a line was edited rather than replaced, the exact words that changed are highlighted inside it, so a single altered number in a long contract clause jumps out. Unchanged lines are shown in grey for context. The summary counts additions, removals and changed lines.

What people compare

Diff checkers are used to compare contract drafts, essays and translations, configuration files, code snippets, CSV exports and AI-rewritten text against the original. The comparison uses the longest-common-subsequence algorithm — the same idea behind git diff. Turn on “Ignore case” or “Ignore extra whitespace” to hide differences that don’t matter. Your text is compared in the browser and never uploaded.

Comparing documents and PDFs

To compare Word files or PDFs, copy their text into the two boxes — use PDF to Text for PDFs. For structured data, the JSON Diff tool compares JSON keys and values.

How the summary counts

The checker first matches whole lines that are unchanged, using the longest-common-subsequence method. Everything left over is shown as removed (red) or added (green). Then it looks at the order: when a removed line is immediately followed by an added line, the pair is treated as one changed line and the individual words that differ are marked. Any other removed or added lines are counted on their own. That is why a block of several replaced lines usually shows a mix of removed, changed and added.

The ignore options apply to the line matching. “Ignore extra whitespace” squeezes runs of spaces and tabs into one and trims the ends, so re-indented code matches; “Ignore case” treats capitals as equal. Inside a changed line, however, the word highlighting is exact — a word that differs only in case, or that has a comma attached (“dog” vs “dog,”), is still highlighted.

Getting a cleaner comparison

  • Match the layout first. Text copied from PDFs or emails is often hard-wrapped at different points. Run both versions through Remove Line Breaks, or put one sentence per line in each — line-based diffs work best with short lines.
  • Normalise data before comparing. For lists, sort both versions with Sort Lines so that reordered items do not show up as changes; for JSON, use JSON Diff.
  • Very large texts: when the two versions are so long that the number of line pairs passes 25 million — two 5,000-line files — the tool skips matching and shows the whole original as removed and the whole new version as added. Compare such files in sections.
  • Check what the options hide. Whitespace can matter — in Python indentation, YAML files and fixed-width data — so turn “Ignore extra whitespace” off when comparing those.

Worked examples

Two versions of rental terms

Original: Rent ₹25,000 · Deposit 2 months · Notice 1 month. New: Rent ₹27,500 · Deposit 2 months · Notice 2 months · Pets allowed. Result: 1 added · 0 removed · 2 changed — the rent and notice lines are highlighted, “Pets allowed” is new.

Two edited lines in a row

Original: “Clause 1 / Rent is 25000 / Deposit is 2 months / Clause 4”. New: “Clause 1 / Rent is 27500 / Deposit is 3 months / Clause 4”. You might expect “2 changed”, but the summary reads 1 added · 1 removed · 1 changed. The comparison lists both old lines before both new lines, and only a removed line sitting directly before an added line is paired as “changed” with word highlights. Read the red and green rows together and you will see both edits.

The same sentence, wrapped differently

“This agreement starts on 1 April and ends on 31 March next year.” on one line, against the same words split over two lines, gives 1 added · 1 changed even though no word changed. Join the lines first so both versions have the same layout.

Pro tips

  • Ignore whitespace when comparing code formatted differently.
  • Compare one section at a time for very long documents.
  • Read a changed pair from top to bottom: struck-through words in the red row are what was removed, highlighted words in the green row are what replaced them.
  • Re-run the comparison after fixing case or spacing issues; the summary updates as you type.

Glossary

Diff
A list of differences between two texts.
LCS
Longest common subsequence — the algorithm that matches unchanged lines.
Changed line
A removed line directly followed by an added line, shown together with word-level highlights.
Word-level diff
A comparison inside a line that marks individual words rather than the whole line.
Hard wrap
A real line break inserted to keep lines short, as in plain-text emails and PDFs.

Frequently asked questions

Is my text saved or uploaded?

No. The comparison runs only in your browser.

Can I compare code?

Yes — it works on any plain text, including code and JSON.

Can I compare Word documents?

Copy the text from each document and paste it into the two boxes.

Can I compare more than two texts?

Two at a time.

Does it detect moved lines?

Moved lines show as removed in one place and added in another.

Why do two edited lines show as one removed, one changed and one added?

Removed lines are listed before added ones, and only a removed line directly above an added line is paired as changed. Both edits are still shown in red and green.

Why is a word highlighted when only its capitals changed, even with Ignore case on?

Ignore case applies when matching whole lines. Inside a line that changed for another reason, the word highlighting compares words exactly.

Is there a size limit?

There is no fixed limit, but for very large pairs of texts the tool stops matching lines and shows everything as removed and added. Split big documents into sections.

Found it useful? Share the Diff Checker (Text Compare):

Last updated 2026-11-21 · Built by Vinayak Agarwal · Part of Text & Writing (36 tools)