Guides

How to Compare Two Documents and Find Every Change

Compare two versions of a contract, essay or code line by line, word by word or character by character, and learn to read the similarity score correctly.

Why reading side by side misses changes

When two versions of a document are almost the same, your eyes fill in what they expect to see. A payment term that changed from 30 days to 15 days, a removed "not" or a new final sentence is easy to miss on the third read. A comparison tool, often called a diff, lines up the two texts and marks exactly what was added and removed, so you review the changes instead of rereading everything.

It also works the other way round. When a signed document or a final draft comes back to you and you want to confirm that nothing was touched, a comparison tells you at once: if there are no differences, the tool reports that the two texts are identical.

Compare two texts step by step

Our diff checker works in your browser, so both texts stay on your device. It accepts up to 500,000 characters per text, which covers long contracts and most source files.

  1. Paste the original version into Original text.
  2. Paste the new version into Changed text.
  3. Under Compare by, choose Words, Lines or Characters.
  4. Set Ignore upper/lower case and Ignore extra spaces to Yes or No.
  5. Run the comparison.

The result highlights added and removed text, and lists the similarity, the unit used, and how many pieces were added, removed and unchanged. You can also download the list of changes as a text file, with added parts marked + and removed parts marked −.

Always put the older version in Original text. If you swap the two boxes, everything is reversed: new wording shows as removed and old wording as added, which is confusing when you report the changes to someone else.

Line, word or character: which to choose

The unit changes what counts as a single change.

  • Lines suit code, configuration files, lists and CSV data. If anything on a line differs, the whole line is shown as removed and re-added, which matches how programmers review changes.
  • Words suit contracts, essays, letters and policies. A change from 30 to 15 shows as one removed word and one added word, with the rest of the sentence left alone.
  • Characters suit short text where every symbol matters: product codes, account numbers, URLs, names and spelling corrections.

A practical approach is to start with words to see the overall picture, then switch to characters for any sentence containing numbers or names you need to check closely.

When to ignore case and extra spaces

Ignore extra spaces treats any run of spaces, tabs and line breaks as a single space. Turn it on when the text was copied from a PDF or an email, re-wrapped, or reformatted with double spaces, so layout noise does not bury real changes.

Ignore upper/lower case is useful for headings or text that was retyped with different capitalization.

Leave both off when the difference matters. In Python and YAML, indentation is part of the code. In contracts, a capitalized Defined Term can mean something different from the same word in lower case. Passwords, codes and file names are often case-sensitive.

Reading the similarity score

The similarity score is calculated as 2 × unchanged pieces ÷ (pieces in the original + pieces in the changed text). In word mode, the pieces include words, spaces and punctuation marks; in line mode they are lines; in character mode, characters.

Keep three points in mind. First, the score depends on the mode, so only compare scores calculated the same way. Second, a high score does not mean the change is minor: a 99% match on a contract can still hide a changed amount or deadline. Third, it is not a plagiarism or originality score; it only measures how much of one text appears in the other, in the same order.

Comparing Word documents and PDFs

The diff checker compares plain text, so get the text out of the files first. For Word files, Word to text extracts the text from a .docx file in your browser, including tables and line breaks, and gives a word count. Old .doc files need to be saved as .docx first. Deleted tracked changes are skipped, so the extracted text reflects the document with those deletions removed.

Formatting changes, such as bold, fonts or margins, do not appear in a plain-text comparison. If those matter, most word processors also have a built-in compare feature that shows formatting changes.

For two PDFs, you can copy the text from each, or use PDF comparison, which compares the extracted text of exactly two PDF files. It runs on our server, so the files are uploaded temporarily. Scanned PDFs have no text to extract and need OCR first.

A practical review routine for contracts

Make sure both versions come from a reliable source, such as the copy you sent and the copy you received back. Compare in word mode with Ignore extra spaces on, then read every highlighted change in context. Recheck amounts, dates, names and defined terms in character mode. A comparison shows what changed, not what it means, so get professional advice on the meaning of important terms.

Common questions

Is it safe to paste a confidential contract into the diff checker?

The diff checker runs in your browser, and both texts stay on your device rather than being sent to our server. As with any private document, use a device you trust and close the tab when you are done.

Can the diff checker compare formatting?

No. It compares the text only, so changes to bold, fonts, colours or layout are not shown. Use your word processor's compare feature if formatting changes matter.

Why is a whole line marked as changed when I only edited one word?

You are comparing by lines, which treats each line as a single piece. Switch Compare by to Words or Characters to see exactly which part of the line changed.

Last updated:

Useful next steps