The quick answer: paste both versions and read the colors
Someone sends back a contract with a few small changes, or you have two drafts of an essay and cannot tell which sentences moved. Put the old version on the left and the new one on the right in the text diff checker, and every removal is marked coral and every addition mint.
- Paste the original into the left box and the changed version into the right box. You can also load a plain text file into either box.
- Choose how to compare: Lines for code, config files and lists, Words for writing, Characters to find one changed letter. For prose, compare text opens at word level in an inline view that reads like tracked changes.
- Switch on Ignore whitespace or Ignore case if those differences do not matter, and, in Lines mode, Only changes to fold the unchanged stretches.
- Read the marked changes, then copy the result or download it.
Lines, words or characters: which level to pick
The level decides what counts as one piece of text, and so what can be reported as changed.
| Level | A piece is | Best for | Watch out for |
|---|---|---|---|
| Lines | One whole line | Code, config files, CSV exports, lists | A one-word change makes the whole line differ. The changed words are also marked inside it, except in very long lines |
| Words | A run of letters. don't is one word and 3.14 is one number. Each punctuation mark is its own piece | Essays, contracts, product descriptions, page text | A moved paragraph shows as removed and added |
| Characters | One visible character. An accented letter or an emoji counts once | A typo in a name, an ID or a short string | Breaks words into fragments when whole sentences changed |
Prose is where line mode misleads: change one word and the whole paragraph looks different. Character mode is the opposite, too fine for sentences. Word level is what a person reading wants. Chinese, Japanese and Thai are compared one character at a time.
Reading the result
Coral is text that is only in the original, mint is text that is only in the changed version, and anything unmarked is the same in both. Side by side shows the original with its removals on one side and the new text with its additions on the other. In Words and Characters mode, Inline puts each deleted piece next to the one that replaced it, in reading order (in Lines mode it lists the removed lines above the added ones), and it is the default on narrow screens.
The counts are pieces at the level you chose, except that Words mode compares punctuation and spaces but does not count them, and Characters mode does not count spaces when Ignore whitespace is on. Similarity is twice the number of shared counted pieces divided by all the counted pieces in both texts, so identical texts score 100% and texts with nothing in common score 0%. The same pair of texts can score differently at each level, so only compare scores at the same level.
A moved paragraph shows as two changes
The comparison looks at order, not at where text went. A paragraph that moved is gone from one place and new in another, so it is reported as removed and added. It does not understand meaning either: a sentence rewritten in other words shows as removed and added even if it says the same thing. It is a comparison, not a legal review. It shows that words changed, not whether the change matters.
Very long texts that share very little can take too long to compare exactly. After about a second the tool stops, keeps the shared start and end, and shows the middle as one changed block. The page tells you when that happens. Compare by lines, or compare shorter parts, for the full detail.
Copy a patch or a marked-up version
In lines mode, the copy is a standard unified diff. It starts with --- original and +++ changed, then lists each change with three lines of context in @@ blocks. Tools such as patch can apply it to the original file, for example patch original.txt < changes.diff. git apply takes the file to change from the two header lines, so edit them to your file's path first.
In words and characters mode, the copy puts [-removed-] and {+added+} around the changes in the running text. That is plain text, so it survives any email or chat, and it is the quickest way to show a colleague what changed.
Clean both texts first so the diff shows real changes
The most common disappointment is a diff where almost everything is marked changed because the two texts differ in ways you cannot see.
- Wrapping and spacing. One version was re-wrapped, indented with tabs or has trailing spaces. Ignore whitespace treats any run of spaces, tabs and line breaks as one space. In Words or Characters mode a re-wrapped paragraph then matches the original. In Lines mode it only ignores spacing inside each line, so a re-wrapped paragraph still differs line by line.
- Capital letters. Ignore case compares everything in lower case. The text you see stays as it was written. To change the case of the text itself, see change text case.
- Copied from the web or a PDF. Those two switches do not cover curly versus straight quotes, zero width spaces or leftover HTML tags, and in lines mode a PDF that breaks every line never matches a paragraph that does not. Run both versions through the text cleaner with the same switches, such as Remove line breaks with Keep paragraph breaks on, Remove invisible characters, Straighten curly quotes and Strip HTML tags.
- Minified JSON. It is one long line, so a line diff marks all of it. Pretty print both sides with the JSON formatter first, as format and validate JSON explains.
- Lists. For two lists, you may not need a diff at all. Paste both into the duplicate line remover and choose Show only repeated lines to see the items in both, or Show only lines that appear once for the items in only one. That works when neither list repeats an item within itself. For cleaning and ordering a list first, see remove duplicates and sort a list.
Clean both sides the same way, or you create new differences. And if the point of the comparison is formatting, leave the whitespace switch off.
If a word limit applies to an essay or an abstract, the word counter gives the total for each version, while the diff reports the pieces added, removed and unchanged. Counters follow slightly different rules for hyphens and numbers, so check a hard limit in the program that will judge it. Word count and reading time explains where the rules differ.
Contracts, drafts and other things you want kept private
Both texts stay in your browser tab. Nothing is uploaded or stored, and a file you load is read on your device. Many free comparison sites send both texts to a server, which matters when the text is a contract, a manuscript or an unreleased statement. To check, open the Network tab in your browser's developer tools, paste the texts and watch that no request carries them.
The tool compares plain text only. It cannot read Word or PDF files, and when you paste from Word only the plain text arrives, so formatting and comments are left behind. Tracked changes are not marked in the pasted text, and depending on the view you copy from, deleted text may come along too, so check that the pasted text is the version you meant. For a PDF, copy the text out first with PDF to text. That works for PDFs with a real text layer, not scans. See how to copy text from a PDF, and is it safe to upload a PDF to a free website if you wonder why this matters.
It is also not a plagiarism checker. It compares the two texts you give it and looks nowhere else.