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.txt | Changed: library-notice.txt | ||||
|---|---|---|---|---|---|
| 1 | Removed | The library opens at | 1 | Added | The library opens at 8 a.m. on weekdays and at 10 a.m. on Saturdays. |
| 2 | Removed | Members can borrow up to | 2 | Added | Members can borrow up to 15 books at a time for three weeks. |
| 3 | Late returns cost 25 cents per book per day. | 3 | Late returns cost 25 cents per book per day. | ||
| 4 | Added | Study rooms can be booked online up to a week ahead. | |||
| 4 | The reading room is closed on public holidays. | 5 | The 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.
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
Related guides
Frequently asked questions
Can I compare Word or PDF files directly?
Why does every line show as changed?
Related tools
JSON Formatter
Validate, format, and minify JSON. Browse it as a tree, run JSONPath queries, compare two documents, or validate against a JSON Schema.
Use toolCharacter Counter
Count characters, words, sentences, paragraphs, and lines. Check writing limits and count specific characters or phrases.
Use toolText Encoding Converter
Convert text to Base64, binary, hex, URL encoding and HTML entities, and back again.
Use tool