How to find what changed between two versions of a document

By TechCompare · Updated · How we check

Copy the text of both versions, paste one on each side, and read the marked words. Keep one paragraph per line so the diff lines up whole paragraphs.

The example

2 changes: 2 lines removed, 3 added

Original: library-notice.txtChanged: library-notice.txt
1RemovedThe library opens at 9 a.m. on weekdays and at 10 a.m. on Saturdays.1AddedThe library opens at 8 a.m. on weekdays and at 10 a.m. on Saturdays.
2RemovedMembers can borrow up to 10 books at a time for three weeks.2AddedMembers can borrow up to 15 books at a time for three weeks.
3Late returns cost 25 cents per book per day.3Late returns cost 25 cents per book per day.
4AddedStudy rooms can be booked online up to a week ahead.
4The reading room is closed on public holidays.5The reading room is closed on public holidays.

Someone sent back a document and said they made "a few small edits". Finding them by reading both copies takes a long time, and a changed number is easy to miss. A text diff does it in one step. It shows every sentence that changed and marks the words inside it that are different.

Changes in the example
2
2 lines removed, 3 added
Lines
4 and 5
Original and changed text
Category
Documents
Text diff guides

How this is calculated

The example is a short notice about library hours, before and after an edit. The tool finds 2 changes: 2 lines removed, 3 added. Two sentences were edited and one new sentence was added. Inside the edited lines, the marks land on the opening time and the borrowing limit, the two facts that changed. The sentence about late fees stayed the same, so it shows as plain context.

A text diff works in lines, and the document's line breaks decide what a line is. Text copied from a word processor usually keeps each paragraph on one line, which is what you want. Text copied from a PDF or an email often breaks every few words, at the edge of the page. If the two copies wrap in different places, nearly every line looks changed even when the words are the same.

To fix that, join each paragraph back into one line before you compare. Most editors can replace single line breaks with spaces. Then the diff compares paragraph against paragraph and the word marks show the real edits.

Formatting doesn't come along when you paste plain text. Bold, fonts, comments and tracked changes all drop out, so the diff only sees words. To review formatting too, use Compare on the Review tab in Microsoft Word or Tools, Compare documents in Google Docs.

Verdict

For words and numbers, a text diff is the fastest check: paste, read the marks, done. Join wrapped lines first so each paragraph is one line. Reach for your word processor's compare feature when formatting or comments matter, and for the text diff when you just need to know which words changed.

More Text Diff scenarios

Frequently asked questions

Can I compare Word or PDF files directly?
The tool reads plain text files. For a Word or PDF document, copy all of the text from each version and paste it into the two boxes. Formatting and comments don't come along, only the words.
Why does every line show as changed?
The two copies probably wrap their lines in different places, which happens a lot with text copied from PDFs and emails. Join each paragraph into a single line in both copies, then compare again.