Text Diff Checker
Compare two blocks of text and highlight every added or removed line.
Your files never leave your device. Everything runs in your browser.
What Text Diff Checker does
Text Diff Checker compares two blocks of text line by line and marks what changed. Paste the original on the left and the changed version on the right, click Compare, and a single list shows the result: unchanged lines stay plain, removed lines are prefixed with a minus and a red tint, and added lines with a plus and a green tint.
It is useful for reviewing edits someone else made to a document or snippet, checking that two versions of a contract differ only where you expect, spotting accidental deletions after a copy-paste, or comparing exported text from two systems. Comparing “alpha, beta, gamma” with “alpha, BETA, gamma, delta” marks beta as removed, BETA and delta as added, and leaves alpha and gamma untouched.
The comparison is exact, case-sensitive and whitespace-sensitive, and it works on whole lines. A change of one character in a line is shown as that line removed and its replacement added, not as an inline character highlight.
How to use Text Diff Checker
- Paste the original text into the Original box.
- Paste the changed text into the Changed box.
- Click Compare.
- Read the result below: plain lines are unchanged, lines starting with a minus exist only in the original, and lines starting with a plus exist only in the changed text.
- Edit either box and click Compare again to refresh the result.
Features
- Line-by-line comparison built on a longest-common-subsequence algorithm, which keeps the pairing stable when lines are inserted or deleted.
- Added lines highlighted in green with a + prefix; removed lines in red with a − prefix; unchanged lines muted.
- Exact comparison: capitalisation and every space, tab and trailing character are part of the match.
- Guards against runaway input — comparisons above roughly 4,000,000 line combinations are refused with a message instead of hanging the tab.
- Both texts stay in the browser; nothing is uploaded.
- No formatting is imposed on the inputs: anything from code to prose can be compared as plain text.
Tips and common mistakes
- Comparison is whole-line. A single changed character shows the entire line as removed and re-added, so read the paired − and + lines to see what actually changed.
- Whitespace counts. Trailing spaces, tabs versus spaces and different line endings all make lines differ; clean the input with Line Tools if the differences are purely cosmetic.
- Case counts too: “Total” and “total” are different lines, and there is no case-insensitive option.
- The size guard uses the number of original lines multiplied by the number of changed lines, capped at 4,000,000 — two lists of 2,000 lines are accepted, but two lists of 3,000 are not.
- There is no export button — the result is a view. Keep copies of the two input texts, or screenshot the diff if you need to share it.
- Both boxes are plain textareas with no auto-compare; click Compare after editing so the view matches the current inputs.
Frequently asked questions
Does it highlight changes inside a line?
No. The comparison is line by line, so a line with any difference is shown once as removed and once as added in full. For a small edit, the side-by-side minus and plus lines are usually enough to spot the change.
Is the comparison case-sensitive?
Yes. Lines must match exactly, including capitalisation and every space or tab. There is no option to ignore case.
Can it ignore whitespace or empty lines?
No, there are no comparison options. If whitespace has changed wholesale, clean both texts first with Line Tools — trim spaces and remove empty lines — and compare the cleaned versions.
How large can the two texts be?
The tool accepts comparisons where the number of lines in one box multiplied by the number in the other is at most 4,000,000 — for example two files of 2,000 lines. Bigger pairs are refused with a “Text too large to diff” message rather than freezing the page.
Why is a line I did not touch shown as changed?
Usually because of an invisible difference: a trailing space, a tab where the other version has spaces, or a different quotation or dash character. Replacing a line is exact, so any of those counts as a real change.
Is my text uploaded?
No. Both texts are read directly from the textareas and compared in your browser; closing the tab discards them.
Related text tools: Line Tools, Find & Replace, Word Counter, Regex Tester.
Both texts are compared in your browser and never uploaded.