PRACTICAL GUIDE
How to Compare Two Versions of a Text
Find what actually changed between two drafts, two config files or two exports, without reading both copies line by line and hoping to spot it.
Last updated
Why reading both copies does not work
Two versions of the same document are mostly identical, and that is exactly what makes the differences hard to see. The eye skims what it recognises, so a changed figure, a flipped word or a removed clause sits in plain sight and gets read as the version you already know.
This is why every version-control system ships with a diff. The point is not to save time reading; it is to stop the reader from being the thing that has to notice.
What a comparison actually computes
A line-based diff looks for the longest sequence of lines the two texts have in common, in order. Everything inside that sequence is unchanged. Everything outside it has to be an insertion or a deletion, and that is what gets marked.
A line removed in one place and added in another is treated as an edit rather than as two unrelated events, which is why a good comparison highlights the specific words that moved inside a line instead of colouring the whole line red and green.
The ignore options, and when to use them
Reindenting a file changes every line without changing anything meaningful. Ignoring whitespace makes those changes disappear from the report so the real edits stand out, which is the usual reason to reach for it when comparing code, JSON or CSV.
Ignoring case is narrower. It is useful when comparing values that are case-insensitive by nature — email addresses, hostnames, hex colours — and misleading anywhere case carries meaning, which in prose it usually does.
Ignoring blank lines helps when one copy has been through an editor that adds or collapses them. None of these options change the text you see: they only change what counts as a match.
Comparing things that are not prose
Configuration files, exported CSVs, translation files and API responses all compare well line by line, because their format already puts one meaningful unit on each line. Documents from a word processor do not: copy the text out first, or the comparison will be dominated by formatting that never appears on screen. A PDF has the same problem in a worse form, since its text is stored as positioned fragments rather than lines.
When a diff is the wrong tool
If two files should be byte-for-byte identical — a download you want to check, a backup you want to trust — comparing the text tells you less than comparing a hash, which answers the question in one value and catches changes a text view cannot show. Use a diff when you need to know what changed, and a hash when you only need to know whether anything did.
Frequently asked questions
Is my text uploaded when I compare it?
No. The comparison runs in your browser using the text in the two boxes. Nothing is sent to a server, which matters when the thing you are comparing is a contract draft, a configuration file or an export that contains personal data.
Why is a whole block marked as changed instead of just one word?
Word-level highlighting is applied when a removed line can be paired with an added line in the same position. When several consecutive lines change at once there is no reliable pairing, so the block is shown as removed and added instead. Comparing a smaller section usually restores the detail.
Can I compare two files instead of pasting?
Open each file in a text editor and paste its contents into the two boxes. Keeping it to pasted text is deliberate: it makes clear that the comparison only ever sees what you put in front of it.
What is the largest text I can compare?
The comparison builds a table proportional to the two lengths multiplied together, so there is a limit. In practice, files with a large amount of shared content compare quickly even when they are long, because the identical beginning and end are matched before the table is built.