Text diff
Two versions of the same thing, and you need to know what changed. Paste both.
Runs in your browser. Nothing you paste or drop here is uploaded anywhere.
Text files can be dropped straight onto either box.
Press j for the next change and k for the previous one (when you are not typing in a box).
How to use it
- Paste the old version into Original and the new one into Changed. Or drop a text file on either box.
- Read the summary line, then jump from change to change with Next and Previous, or press j and k.
- Set Highlight to Words or Characters to see exactly what changed inside a line. Tick Ignore whitespace if re-indented code is drowning out the real changes.
- On long files, tick Hide unchanged lines. When you are done, Copy unified diff gives you a patch to paste into a ticket or a code review.
What it does
The tool compares the texts line by line with the Myers algorithm, the same one git diff uses by default. Then it compares the words or characters inside each changed pair of lines. Removed lines are marked − and added lines +, so you do not have to tell red from green.
Whitespace and letter case can be ignored. Windows line endings (CRLF) count as plain LF, so a file saved on Windows does not light up every line. A missing newline at the very end of a file does count, the same as in git.
The copy button gives you a standard unified diff: --- and +++ headers, then @@ hunks with three lines of context. patch and git apply both accept it. Files up to 20 MB open straight from your disk. Large inputs are compared in a background worker, so the page keeps responding while you type.
If git shows you a merge conflict rather than a diff, set merge.conflictStyle to zdiff3. It adds the common ancestor between the two sides, so you can see what each side actually changed. My note on zdiff3 has an example.
Questions
How do I compare two files for differences?
Drop one file on Original and the other on Changed: the browser reads them locally and nothing is uploaded. In a terminal, the same thing is diff -u old.txt new.txt, or git diff --no-index old.txt new.txt if you want git’s colours.
Why does every line show up as changed?
Almost always it is whitespace: tabs against spaces, trailing spaces, or a formatter that re-indented the whole file. Tick Ignore whitespace. If identical-looking lines still differ, switch Highlight to Characters: a non-breaking space or a curly quote will show up as a single marked character.
Does it work with Hebrew, Arabic or Russian text?
Yes. Each line takes its own direction, so Hebrew and Arabic read right to left while code stays left to right. Words are split on Unicode letters, so Cyrillic and Hebrew words are highlighted as whole words.
Can I compare two Word documents or PDFs?
Not directly. A .docx is a zip archive and a PDF is a page description, so the tool sees bytes, not sentences: it either refuses the file as binary or shows you noise. Copy the text out of each document and paste it into the two boxes, or save both as plain .txt first. For changes inside Word itself, with formatting, Review → Compare does the job.
How do I compare two lists and see what is missing?
Sort both lists first, one item per line, then paste them in. Lines that are only in the first list are marked −, lines only in the second are marked +. Without sorting, the same items in a different order show up as a mess of removals and additions. Sort the column in Excel or Sheets, or run sort list.txt in a terminal, and tick Ignore case if Apple and apple are the same thing to you.