How to compare two versions of a text and see exactly what changed
Spot the real differences between two drafts, two contracts or two API responses — including the invisible changes that cause the most trouble.
· 6 min read
To compare two versions of a text, put them side by side in a diff tool: it aligns the parts that are identical and marks everything else as added or removed. Reading two versions in two windows finds the paragraph that was rewritten and misses the "not" that was deleted in clause 7.
The quickest route here: paste the old version on the left and the new one on the right in Text Compare. Additions and deletions are highlighted, identical passages stay plain, and a counter at the top tells you how many units were added, removed and left alone. Switch Compare by to Words for prose and Lines for lists, code and configuration files. Both texts stay in your browser, which matters when the document is a contract or a medical letter.
Choosing a method
| Method | Good for | Watch out for |
|---|---|---|
| A diff tool like this one | Anything you can select and copy; JSON, CSV, code, prose | You compare wording, not layout or formatting |
| Word's Compare feature | Two .docx files, where you want a redline to send back | Produces a third document; both originals must be .docx |
| Google Docs | Drafts already in Drive; seeing who changed what | Desktop Docs only; needs both files in your Drive |
| Compare PDF | Two PDF versions of the same document | Compares extracted text, so scans need OCR first |
Word. On the Review tab, in the Compare group, choose Compare → Compare two versions of a document (legal blackline), pick the original and the revised file, and select OK. Word opens a new third document in which the differences appear as tracked changes; neither source file is modified. This is the right tool when the other side expects a redline.
Google Docs. Open the newer document and use Tools → Compare documents, then select the older one. Docs builds a new file with the differences as suggested edits. For a document only you have edited, File → Version history → See version history is faster: it shows named versions and highlights what each one changed.
For anything else — an email, a configuration file, a translation, two API responses — copying the text into a diff tool is quicker than any of the above.
The changes you cannot see
Some differences are invisible on screen and still change what software does with the text. These are the ones a diff tool earns its keep on:
- Straight versus curly quotes.
"and"look almost the same. A curly quote breaks code, and inside a CSV file it stops being a field delimiter. - Non-breaking spaces. U+00A0 is not the same character as an ordinary space. Word processors and web pages insert them constantly, especially in French typography before
:and?. - Trailing spaces. One space at the end of a line is enough to make two otherwise identical lines differ.
- Zero-width characters. Zero-width spaces and joiners survive copy and paste and render as nothing at all.
- Line endings. A file written on Windows ends each line with CR LF; one written on macOS or Linux uses LF alone. Change that and every line in the file reports as modified.
- Unicode normalisation.
écan be one code point (U+00E9) or two (eplus a combining acute accent). Both display identically and both count as one character on screen, but they are not the same string.
If the comparison flags a line that looks identical, it is almost always one of these. Run both sides through Text Cleaner first — it straightens quotes, removes invisible characters and normalises spacing — and then compare the wording itself. The Ignore whitespace and Ignore case options in Text Compare do the same job for a quick look, but they also hide real changes, so turn them back off before you sign anything.
Comparing lists: sort first
Two lists with the same entries in a different order show up as entirely different. Put both through Sort Lines with the same settings, and the comparison then shows only genuine additions and removals. If one side contains repeats, clear them with Remove Duplicate Lines first — see How to remove duplicates from a list for the options that matter.
Comparing JSON or code: format both the same way
The same JSON document can be written on one line or across forty, with keys in any order. Before comparing, run both through JSON Formatter with the same indentation and with key sorting turned on. What is left is the difference in the data rather than a difference in how it was written. The same applies to CSS, XML and minified HTML: normalise the formatting, then diff.
A review checklist for contracts and quotes
When you are checking a revised document rather than exploring it, look at these four things specifically, because they change quietly:
- Figures — amounts, percentages, dates, notice periods, payment terms.
- Names of parties and their legal entities; a subsidiary swapped for a parent company is one word on the page.
- Negations — "shall" against "shall not", "including" against "excluding".
- Cross-references to other clauses, which shift by one as soon as a clause is inserted above them.
When the comparison looks wrong
Everything is marked as changed. Almost always line endings, encoding, or a whole file that was re-indented. Compare by words instead of lines, or clean both sides first.
The two texts are too different. A diff aligns matching passages; when almost nothing matches, the result degenerates into "delete everything, insert everything". That is a signal, not a bug: the document was rewritten, not edited.
A paragraph moved and shows as deleted and re-added. Line and word diffs do not track moves. Read the two blocks to confirm they are identical before worrying about it.
The PDF comparison shows differences you cannot see. Extracted text carries the reading order of the PDF, so a change in column layout can reorder the text without changing a word. Compare the wording paragraph by paragraph when that happens.
A scanned PDF produces nothing. There is no text to extract, only an image. It needs OCR first.
Questions people ask
Can I compare two Word documents here? Copy the text out and paste it in. You will compare the wording, not the formatting or tracked changes. For a redline to send back, use Word's own Compare feature.
Is anything uploaded? No. The comparison runs in your browser, so confidential drafts stay on your device.
How big a text can it handle? Large ones, but a diff is quadratic in the worst case, so two very long and very different texts are slow. Compare section by section when that happens.
Can I compare more than two versions? Not at once. Compare version 1 against 2, then 2 against 3; that also tells you which round introduced each change.
Does it show moved text? No. A moved block appears as a deletion in one place and an insertion in another.
Next steps
- Normalise both texts before comparing: Text Cleaner
- Put lists in the same order first: Sort Lines
- Clean up text pulled out of a PDF: How to clean up text copied from a PDF
Tools used in this guide
- Text Compare (Diff Checker)Compare two texts and highlight the differences.
- JSON FormatterBeautify JSON with indentation and optional key sorting.
- Sort LinesSort a list alphabetically, by number or length, or shuffle it.
- Remove Duplicate LinesDelete repeated lines from a list and keep the original order.
- Text CleanerFix broken lines, smart quotes, HTML and hidden characters.
- Compare PDFSee what changed in the text between two PDF versions.