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.
· 2 min read
Reading two versions side by side is how mistakes slip through. A comparison tool marks every addition and deletion, which takes seconds and misses nothing.
The basic move
Paste the old version on the left and the new one on the right in Text Compare. Added text and removed text are highlighted; identical passages stay plain. It works for anything you can select and copy: an email, a contract clause, a configuration file, a translation.
For a PDF or a Word document, select the text and copy it rather than exporting — you are comparing wording, not layout.
Watch for the changes you can't see
Some differences are invisible on screen but change how software treats the text:
- Straight versus curly quotes.
"and"look almost alike and break code and CSV files. - Non-breaking spaces. Copied from a web page or a word processor, they are not the same character as an ordinary space.
- Trailing spaces at end of line. Invisible, and enough to make two lines differ.
- Line endings. A file written on Windows ends lines differently from one written on a Mac or Linux.
If the comparison flags a line that looks identical, one of these is usually why. Text Cleaner normalises quotes and spacing so you can compare the wording itself.
Comparing lists: sort first
Two lists with the same entries in a different order will show as entirely different. Run both through Sort Lines first, and the comparison then shows only genuine additions and removals. Remove Duplicate Lines helps when one list contains repeats.
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 key sorting turned on. What remains is the actual difference in the data, not a difference in how it was written.
The same applies to CSS: format both files before comparing.
A quick review checklist
For a contract or a quote, check these specifically, because they are the ones that change quietly:
- figures — amounts, percentages, dates, deadlines;
- names of parties and their legal entities;
- negations ("shall" versus "shall not");
- cross-references to other clauses, which shift when a clause is inserted.
Both texts stay in your browser — nothing is uploaded, which matters when the document is confidential.
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.