How the comparison works
The two texts are lined up by finding the longest run of content they share in the same order. Whatever is left over on the left was removed, and whatever is left over on the right was added. That is why moving a paragraph shows as one removal and one addition rather than as a move — there is no third category in a diff.
A worked example
Compare two drafts of a paragraph where one word changed. In line mode the whole line shows as removed and re-added, because a line either matches or it does not. Switch to word mode and only the changed word is marked, with the rest of the sentence shown as untouched — the same edit, described at the level you are actually working at.
When to ignore what
Ignore whitespace when a file has been reindented or pasted out of an editor with different settings — otherwise every line reads as changed. Ignore case when comparing names, emails or headings that have been recapitalised. Ignore blank lines when comparing text pulled from a PDF, where page breaks add empty lines that mean nothing.
More free text tools
- Word counterLive word count with reading time, sentences and paragraphs.
- Character counterCharacters with and without spaces, against X, SMS and SEO limits.
- Letter counterCount letters only, with a frequency breakdown for puzzles.
- Text cleanerStrip extra spaces, blank lines and invisible characters in one pass.
- Remove line breaksRejoin text that a PDF or email broke into short lines.
- Remove duplicate linesStrip repeated emails, URLs and names — or keep only the repeats.
Frequently asked questions
Is this diff checker free?
Yes, with no account and no file size limit beyond what your browser can hold.
What is the difference between line and word mode?
Line mode compares whole lines and is what you want for code, CSVs and lists — one changed character marks the whole line. Word mode compares word by word and is what you want for prose, where a single edited word should not paint the entire paragraph as changed.
Are my documents uploaded?
No. The comparison runs in your browser, which is the reason this tool can be pointed at a contract, a medical record or unreleased code without a review.
Why does it say the comparison is approximate?
Comparing two texts exactly means filling a table with one cell per pair of lines. Past about four million cells that would freeze the tab, so very large inputs are compared line for line by position instead, and the tool says so rather than quietly giving you a worse answer.
Can I ignore formatting differences?
Yes. Ignore case, ignore leading and trailing whitespace, and ignore blank lines are each a toggle, so a reindented file or a change in capitalisation does not drown the real edits.