The fast way
Paste the original text on the left (Original text) and the new version on the right (Changed text). The tool below compares them immediately: removed parts are shown in red, added parts in green, and inside changed lines the exact words that differ are highlighted. A summary shows how many lines, words or characters were added and removed, plus a similarity percentage.
This works for any plain text: contracts, offers, essays, translations, product descriptions, configuration files and code. If the documents are in Word or PDF, copy the text out of them first, or use the built in comparison features described below.
Try it here: Text Compare
Open the full tool pageLines, words or characters
A comparison splits both texts into pieces and finds the smallest set of changes between them. The size of the pieces decides what the result looks like, so choose it to match the kind of text.
| Compare by | Best for | What you see |
|---|---|---|
| Lines | Code, lists, CSV, configuration files, documents with fixed line breaks | Whole lines added or removed, with changed words marked inside edited lines |
| Words | Contracts, essays, articles, emails, text copied from PDF | Inserted and deleted words in running text, regardless of line breaks |
| Characters | Codes, IDs, numbers, short values, spelling checks | Every single character that differs, such as 1O instead of 10 |
Comparing contracts and legal documents
With contracts, the risk is a small change hidden in a long text: a date, an amount, a notice period, a not added or removed. Never rely only on the other side's tracked changes or summary of edits; compare the version you agreed on with the version you are about to sign.
Use Words mode. Contracts copied from PDF or email often have line breaks in different places, and a line comparison would mark almost every line as changed. Turn on Ignore extra spaces so double spaces and different indentation do not count. Then read every highlighted change, paying special attention to numbers, dates, names, and words like may, must, shall, not, and, or.
- Check that the similarity is what you expect. A contract with three small edits should be close to 100 percent.
- Swap the texts with Swap if you pasted them the wrong way round; additions and removals switch places.
- Keep the text you compared, so you can show later which version you checked.
Comparing Word and Google Docs files
Microsoft Word has a built in comparison: open Word, go to Review > Compare > Compare, choose the original document and the revised document, and click OK. Word creates a new document that shows the differences as tracked changes, which you can accept or reject one by one. It also compares formatting, which a plain text comparison ignores.
In Google Docs, open one version and choose Tools > Compare documents, pick the other file from your Drive and click Compare. The result opens as a new document with the differences as suggestions. LibreOffice Writer offers the same through Edit > Track Changes > Compare Document.
These built in tools need both files in the same program and are best for formatted documents. For text from emails, web pages, PDFs or chat messages, or when you only care about the words, pasting both versions into a text comparison is faster.
Comparing essays and drafts
Writers, students and editors compare drafts to see what an editor changed, to check that feedback was applied, or to find which paragraph was rewritten. Use Words mode and the Side by side view: the old draft stays on the left and the new one on the right, with changed words highlighted inside each paragraph.
For a quick overview, look at the summary first. A handful of changed words means copy editing; hundreds of added and removed words mean a real rewrite. The Unified view is handy for reading the changes in order from top to bottom, like a list of edits.
Comparing code and data files
Developers usually compare code with version control: git diff shows changes since the last commit, its word diff option shows changes word by word, and the -w option ignores whitespace. Outside a repository, the diff command on macOS and Linux compares two files, and in VS Code you can select two files in the Explorer, right click and choose Compare Selected.
For a quick check of a snippet, a configuration file from two servers, a JSON response or an exported CSV, pasting both into the tool on this page is often quicker. Use Lines mode, and Ignore extra spaces if indentation differs between the two. Line breaks from Windows, Mac and Linux are treated the same, so a file edited on another system does not show every line as changed.
Ignoring case and whitespace
Text copied from different programs often differs in invisible ways: tabs instead of spaces, two spaces after a full stop, spaces at the end of lines. Ignore extra spaces treats any run of spaces as one and ignores spaces at the line ends, so only real changes remain.
Ignore case treats Contract and contract as the same. Turn it on when capitalization does not matter, for example when comparing a list of email addresses, and leave it off for legal text and code, where a capital letter can change the meaning.
Common problems and fixes
- Every line shows as changed: the line breaks differ, typical for text copied from PDF. Switch to Words mode.
- Many tiny changes everywhere: indentation or spaces differ. Turn on Ignore extra spaces.
- The result says the texts are too large: split them into parts, for example chapter by chapter, and compare each part.
- Red and green are the wrong way round: press Swap so the original is on the left.
- Formatting changes are missing: a text comparison only sees the words. Use Word's Compare to check bold, fonts and layout.