Text Diff Checker
Compare two versions of a text and see exactly what was added, removed and changed — line by line, and word by word inside a line.
The two versions
The differences
Private by design. This page has no backend. Both versions are compared by JavaScript running on your own device and are never sent anywhere.
How the comparison works
Both versions are split into lines, and the page then looks for the longest sequence of lines that appears in both, in the same order. Everything outside that sequence is either a line the original has and the new version does not (removed) or the other way round (added). A line that was edited shows up as one removal and one addition sitting next to each other, which is why the counts above can be larger than the number of edits you made.
Identical opening and closing lines are matched off first, and lines that appear exactly once in each version are used as anchors to break a long comparison into smaller ones. That is what keeps a long document responsive; the result is the same comparison, reached with less work.
Side by side, or unified
Side by side puts the original on the left and the new version on
the right, with a shaded gap where a line has no counterpart. It is the easier view
for prose. Unified lists one line per row with a leading
- or +, in the style of a patch file, which is the easier
view for code and the one that copies cleanly into a message.
Word highlighting
When a removed line and an added line are close enough to be recognisably the same line edited, a second pass compares them word by word and highlights only the parts that changed. Lines that are simply different are left alone, since highlighting scattered words in two unrelated sentences is noise rather than information. The highlight is underlined as well as coloured, so it does not depend on colour alone.
The options
Ignore capitalisation and ignore differences in spacing change which lines count as equal, not how they are displayed — your text is always shown exactly as you typed it. Spacing here means leading and trailing whitespace plus runs of spaces or tabs inside the line, which is what makes a re-indented file readable to compare. Ignore blank lines drops empty lines from the comparison entirely, useful when one version has been re-wrapped. Collapse long runs of identical lines hides the middle of any stretch of more than six unchanged lines and says how many were hidden, so the differences are not separated by pages of agreement.
Similarity
The percentage is the number of matched lines against the total number of lines in the longer version. It is a rough measure of how much of the document survived, not a measurement of meaning, and it is calculated after the options above have been applied.
Common uses
Checking what an editor changed in a draft, comparing two configuration files, finding the one line that differs between a working and a broken script, reviewing a contract revision, and confirming that a copy and paste really was complete.
How to use the Text Diff Checker
- Paste the original text in the first box and the changed version in the second.
- Choose a side-by-side or unified view.
- Review the added, removed and changed lines, then copy the diff.
Frequently asked questions
What is the difference between side-by-side and unified view?
Side-by-side aligns the two versions in columns, while unified view lists the changes in a single stream.
Can I ignore whitespace or case?
Yes. Options let you ignore whitespace, blank lines and letter case so only meaningful changes show.
Is my text compared on a server?
No. The diff is computed in your browser and nothing is uploaded.