Text Diff Checker

Compare two blocks of text and instantly see what was added, removed, or unchanged — line by line, word by word, or character by character.

How to Compare Two Blocks of Text

  1. Paste your original text into the "Original Text" box and the changed version into "Changed Text".
  2. Choose a comparison granularity: Line-level for whole-line changes, Word-level to see exactly which word changed inside a line, or Character-level for the most precise, letter-by-letter diff.
  3. Pick Inline to see one combined stream of changes, or Side-by-side to see the original and changed text in two aligned panels.
  4. Optionally check "Ignore whitespace" to skip re-indentation/re-spacing differences, or "Ignore case" to treat differently-cased text as unchanged.
  5. Click Compare to run the diff.
  6. Review the color-coded output: green marks additions and red marks removals — the status line above totals how many units were added, removed, and left unchanged.

Frequently Asked Questions

How does the diff algorithm actually work?

It runs a classic longest-common-subsequence (LCS) algorithm over the comparison units of both texts — lines, words, or characters, depending on the granularity you choose. The algorithm finds the longest sequence of units that appears, in order, in both versions, then marks every other unit as added or removed relative to that shared sequence.

What's the difference between line-level, word-level, and character-level comparison?

Line-level treats each line as one unit, so a single changed word still marks the whole line as one removed line and one added line. Word-level splits both texts into words and the whitespace between them and diffs those individually, so a single changed word — like "brown" becoming "red" — shows up as just that one word removed and one word added. Character-level diffs individual characters, which is the most precise option and best for spotting single-character typos.

What does "Ignore whitespace" do, and does it work in every mode?

In line-level mode, it trims leading and trailing whitespace from each line before comparing, so re-indented lines won't show as changed. In word-level mode, it removes whitespace-run tokens from the comparison entirely, so text that was reflowed or re-spaced no longer shows as different — only the words themselves are compared, and the output re-joins them with a single space. It has no effect in character-level mode, where the checkbox is disabled.

What does "Ignore case" do?

When checked, comparison units are matched case-insensitively at whichever granularity you've selected, so "Apple" and "apple" count as unchanged instead of as a difference. The output still displays the original text's casing for anything marked unchanged.

What's the difference between Inline and Side-by-side view?

Inline (unified) view shows one combined stream of text with removed units struck through in red and added units highlighted in green. Side-by-side view splits the same diff into two panels — the original text on the left with removed units highlighted, and the changed text on the right with added units highlighted — so you can read each version on its own.

Is there a limit on how much text I can compare?

Yes. The comparison is skipped if the number of comparison units in text A multiplied by the number of units in text B exceeds 4,000,000 — a unit is a line in line-level mode, a word or whitespace run in word-level mode, and a single character in character-level mode. Because character-level comparison produces far more units than line-level for the same text, this limit can be reached with much shorter text when character-level mode is selected.

Is my text uploaded to a server when I click Compare?

No. The entire diff is computed locally in your browser's JavaScript — neither text box is sent anywhere, so you can safely compare drafts or sensitive text.