Text Diff
Compare two texts line by line and see exactly what was added and removed, with a minimal edit script and a copyable unified diff.
Compare each line without its leading and trailing spaces or tabs.
Compare lines as lowercase, so capitalisation differences are not a change.
Lines of context shown around each change in the unified diff.
How it works
- Type or paste the two versions of your text — original on the left, changed on the right.
- The diff updates as you type, in your browser, line by line with a minimal edit script.
- Copy the unified diff or download it as a .diff file to review in any diff viewer.
Frequently Asked Questions
How does the comparison work?
It computes the longest common subsequence with Myers’ algorithm, which finds the SMALLEST set of changes that turns one text into the other. A simpler line-by-line comparison reports everything after an inserted line as changed, which is technically true and completely useless.
Is the difference marked by colour alone?
No. Every changed row carries a + or - prefix and a text label as well as a colour, so the diff is readable with any form of colour blindness and in a screen reader.
Can I ignore case or whitespace?
Yes, and blank lines too. When case or whitespace is ignored, unchanged rows display the right-hand version, since that is the newer text you are moving towards.
How large an input can it handle?
Up to 400,000 characters or 20,000 lines per side. The limits exist because diffing is quadratic in the worst case, and a browser tab that freezes is worse than a message explaining the input is too big.