Diff Checker
Compare two blocks of text or code and see exactly which lines — and which words — changed.
Last updated
How to compare two texts
- Paste the original text on the left and the changed text on the right.
- Choose whether to ignore case or spaces at the ends of lines, and tick Side by side for two columns.
- Read the highlighted changes; use Copy diff or Download .patch to save them.
How this comparison works
Lines are compared with the Myers diff algorithm — the one git diff uses by default — via the open-source jsdiff library. It finds the smallest set of added and removed lines that turns one text into the other, and its running time grows with the number of changes rather than the size of the texts. Large texts are first split at lines that appear exactly once in each version, the idea behind git's patience diff, so even big, heavily edited files compare in a moment and moved blocks line up sensibly.
Where a line was edited rather than replaced, the removed and added versions are paired and the words that changed are highlighted, so a one-character typo in a long line stands out. Tick Side by side for a two-column view, and use Download .patch to save the changes as a standard unified diff that git apply and patch understand. Nothing you paste is uploaded; the comparison runs in your browser.
Questions about comparing text
How do I find the differences between two documents?
Paste one version in each box. Added lines are green, removed lines red, and changed words within a line are highlighted.
Can I compare code?
Yes. It uses the same algorithm as git diff, and Download .patch gives a file that git apply and patch understand.
Can I compare two Word documents or PDFs?
Copy the text out of each and paste it in. Formatting isn’t compared, only the words.
Is there a size limit?
No fixed limit. Large, heavily edited files still compare quickly, and nothing is uploaded.