Productivity
How to Compare Two Versions of a Document
Published 5 min read
On this page
- What should you paste: the file or the text?
- How much did the document change overall?
- What does a real comparison look like?
- How do you read the plus and minus signs?
- Should you use side by side or unified view?
- How do you hide changes that do not matter?
- What can a line-based compare not tell you?
- Comparing documents: FAQ
To compare two versions of a document, copy the plain text of each version, paste the older one into the Original box and the newer one into the Changed box of a text compare tool, and read the highlighted differences. Lines marked with a minus were removed, lines marked with a plus were added, and changed words are highlighted inside the lines. It takes seconds and catches the small edits, like a changed number, that a read-through misses.
This guide walks through one real example, explains how to read a diff, and is honest about what a line-by-line comparison cannot see.
What should you paste: the file or the text?
A text compare works on words, not layout. Copy the text from each version and paste it as it is. Bold, colours, comments and tracked changes from a word processor do not come along, so the result shows changes in wording only. If formatting matters, check it separately.
Always put the older version in the Original box and the newer one in Changed. Keeping that order means removed lines always belong to the old text and added lines to the new one.
How much did the document change overall?
Before reading individual differences, measure the size of the change. Paste each version into the word counter to see how much longer or shorter the new version is. In the example below, the old text has 26 words and 154 characters, and the new one has 35 words and 213 characters. Nine extra words tell you something was added, not only reworded. If you want to know which of those two numbers matters for your task, see word count and character count.
What does a real comparison look like?
Here is a short refund policy before an edit:
Refund policy
Customers may return items within 14 days.
Items must be unused.
Refunds are paid to the original card.
Contact support to start a return.
And after:
Refund policy
Customers may return items within 30 days.
Items must be unused and in original packaging.
Refunds are paid to the original card.
Shipping costs are not refunded.
Contact support to start a return.
Paste both versions and compare. The statistics show 3 lines added, 2 removed and 5 unchanged. Inside the changed lines, the tool highlights the exact words, so you can see that 14 became 30 and that and in original packaging was added to the second rule.
How do you read the plus and minus signs?
The unified view, which you can copy, shows the same comparison in one column:
--- Original
+++ Changed
@@ -1,7 +1,8 @@
Refund policy
-Customers may return items within 14 days.
-Items must be unused.
+Customers may return items within 30 days.
+Items must be unused and in original packaging.
Refunds are paid to the original card.
+Shipping costs are not refunded.
Contact support to start a return.
This is the unified diff format, the same layout the GNU diff tool produces:
- Minus (-): the line was in the original and is gone.
- Plus (+): the line is new in the changed version.
- Space: the line is the same in both.
- @@ -1,7 +1,8 @@: the block covers 7 lines of the original from line 1, and 8 lines of the changed version from line 1.
A line that was edited appears as a minus line followed by a plus line. That is why 14 days and 30 days both appear.
Should you use side by side or unified view?
Both show the same information. Side by side puts old and new next to each other, which is easy to scan on a wide screen. Unified uses one column, which fits a phone. The tool starts in unified view on narrow screens and side by side on wide ones, and you can switch at any time.
How do you hide changes that do not matter?
Sometimes the real edit is buried under noise such as different capitals or extra spaces. Three options change how lines are matched:
- Ignore case treats
Helloandhelloas the same. - Ignore leading and trailing spaces skips spaces at the ends of lines.
- Ignore blank lines leaves empty lines out of the comparison.
In a small test, four lines (Hello World, an indented indented line, a blank line and end) were compared with three (hello world, indented line and end). With every option off the result was 2 lines added and 3 removed. With all three on, the texts were reported as identical. Lines are always displayed as you wrote them; the options only change the matching.
What can a line-based compare not tell you?
- Moved text looks like a delete plus an add. Swap two paragraphs and the tool shows each one removed from its old place and added in its new place. In our test, two swapped paragraphs gave 2 lines added and 2 removed.
- It does not understand meaning. A sentence rewritten with the same idea is simply different text.
- There are size limits. Each side can hold up to 5,000 lines and 200,000 characters. If more than 3,000 lines would have to change, the tool stops and asks you to compare smaller parts.
If you are comparing two lists rather than two drafts, sorting both first changes everything; see how to compare two lists for differences. For JSON, comparing JSON files works best when both are formatted the same way. And for page mockups, stable filler text keeps differences down to real edits, as explained in how to add placeholder text to an HTML page.
Comparing documents: FAQ
How do I compare two Word documents for differences?
Copy the text out of each document and paste the two versions into a text compare tool. Formatting is not compared, only the wording.
What do the plus and minus signs in a diff mean?
Minus marks a line that was removed; plus marks a line that was added. Lines with neither are unchanged.
What is a unified diff?
A single-column view that lists the changed lines with a few lines of context, plus or minus signs, and @@ headers that give line numbers.
Is my text uploaded when I compare?
No. The comparison runs in your browser and nothing is sent or stored.
Why does a moved paragraph show as removed and added?
The comparison matches lines in order. A paragraph that moves no longer lines up, so it is reported in both places.
Related tools
Related guides
- Writing
AMCAS Personal Statement Character Limit: 5,300 Explained
The AMCAS Personal Comments essay allows 5,300 characters, and spaces count. See how many words that is, what counts, and how to check your draft first.
- Writing
Twitter Character Limit: How X Counts Your 280 Characters
The Twitter (X) character limit is 280 for a standard post. Learn how links, emoji and other scripts are counted, and how to check a post before you send it.
- Writing
How Many Words Is 5 Pages Double Spaced? (1 to 10 Pages)
Five double-spaced pages are about 1,250 words, and five single-spaced pages about 2,500. See a table for 1 to 10 pages and why your own count may differ.