Skip to content
TinyTools
Productivity

How to Compare Two Texts and Find the Differences

By TinyTools Team · · 6 min read

Two versions of a document side by side on a laptop screen, added lines highlighted green and removed lines red, comparing two texts.

To compare two texts and find the differences, paste the original version and the changed version into a text comparison (diff) tool. It matches the lines that are the same and highlights only what was added or removed, so you spot a changed figure or a deleted clause in seconds instead of rereading both versions word by word.

This guide explains how a text diff works, when it is worth using, and how to get clean results from messy documents.

Why reading two versions side by side fails

When you compare two versions by eye, your brain fills in what it expects to see. You skim familiar sentences and miss the one where "30 days" became "60 days", or where a line about refunds quietly disappeared. The bigger the document and the smaller the change, the more likely you are to miss it.

A diff tool does not skim. It compares the texts mechanically and shows you every line that differs, however small the change.

When comparing two texts is useful

  • Contracts and agreements. A client sends back "the same contract with a few tweaks". Check exactly which tweaks before you sign.
  • Quotations and price lists. Confirm that only the items you agreed to change were changed between two versions.
  • CVs and cover letters. See what you changed between the version you sent to one employer and another.
  • Essays and assignments. Compare drafts to see what your editor or supervisor changed.
  • Website and social copy. Check what a colleague changed on a page before publishing.
  • Configuration files and code. Find which setting changed between a working file and a broken one.
  • Data exports. Compare two lists, such as customer names or product codes, to see which entries were added or dropped.

How to compare two texts with TinyTools

Text Diff lines up both versions and marks what changed, entirely in your browser.

  1. Paste the original into the "Original" box on the left. This is the version you are comparing against.
  2. Paste the changed version into the "Changed" box.
  3. Choose what counts as a change. Turn on "Ignore case" or "Ignore whitespace" if formatting differences are getting in the way.
  4. Read the result. Removed lines are marked in red and added lines in green, with matching lines left plain. A summary shows how many lines were added, removed and unchanged.
  5. Copy the diff if you want to paste the result into an email or a ticket.

If the two texts match exactly, the tool tells you they are identical. Nothing is uploaded, so confidential contracts and drafts never leave your device.

How line-by-line comparison works

Text Diff compares line by line, which is the same approach used by version-control systems that programmers rely on. If one word changes in a line, that whole line is shown as one removal (the old line) and one addition (the new line). Reading the red and green pair together makes the change obvious.

Getting sentence-level results for prose

Paragraphs in documents are often one very long line. Change a single word and the whole paragraph shows as removed and re-added, which is accurate but not very helpful. To narrow it down:

  1. Put each sentence on its own line in both versions before pasting. A quick way is to find and replace ". " with a full stop followed by a line break in your word processor.
  2. Paste both versions into Text Diff.
  3. Now only the sentences that actually changed are highlighted.

Using "Ignore case" and "Ignore whitespace"

These options stop cosmetic differences from burying real ones.

Ignore whitespace is the one you will use most. When a document is re-wrapped, reindented or passed through a formatter, almost every line can change in spacing alone. With this on, runs of spaces are collapsed and the ends of lines are trimmed before comparing, so only genuine content changes remain.

Ignore case helps when someone has changed capitalisation, such as turning headings into title case, and you only care whether the words changed. If capitalisation itself is the problem, the Case Converter can bring both versions to the same case first.

Worked example: checking a revised quotation

Suppose you sent a client this quotation summary:

Logo design: ₦50,000
Business cards (100): ₦15,000
Delivery: ₦5,000
Payment: 50% deposit, balance on delivery

They send back their "approved" version:

Logo design: ₦50,000
Business cards (200): ₦15,000
Delivery: free
Payment: 50% deposit, balance on delivery

Paste them in and Text Diff shows two removed lines and two added lines. The quantity of business cards doubled at the same price, and delivery became free. Both changes are easy to miss by eye and both cost you money. Now you can discuss them before starting the work. If you need to send a fresh version, the Quotation Maker produces a clean PDF.

Comparing Word documents and PDFs

Text Diff compares plain text, not files. To compare documents:

  1. Word files: open each version, select all, copy, and paste into the matching box.
  2. PDFs: copy the text out of each PDF, or convert them first with PDF to Word and copy from there. Our guide to converting a PDF to editable Word covers that step.
  3. Scanned PDFs are images of text, so there is nothing to copy. You would need to retype or use text recognition first.

Copying from PDFs sometimes breaks lines in odd places. If the result looks noisy, turn on "Ignore whitespace", or rejoin the lines in both versions the same way before comparing.

Tips for cleaner comparisons

  • Prepare both versions the same way. If you split sentences onto lines in one, do it in the other too.
  • Format structured data first. For JSON, run both versions through the JSON Formatter with the same indent so the comparison lines up.
  • Sort lists before comparing when order does not matter, such as a list of names. Otherwise a reordering shows as many changes.
  • Keep the original on the left. It makes red mean "removed" and green mean "added" in the way you expect.

Limits

Text Diff handles large texts well when most of the content matches; a long file with a single edit compares instantly. Two texts that differ across more than about 3,000 lines are refused, because comparing them in a browser tab would freeze it. In that case, compare the documents section by section.

Frequently asked questions

How do I compare two documents for differences for free?

Copy the text from each document and paste them into Text Diff. Added lines appear in green and removed lines in red. It is free and needs no sign-up.

Does it compare word by word?

It compares line by line. A changed line shows as one removal and one addition. For prose, put each sentence on its own line first to get close to a sentence-level comparison.

Can I compare two PDF files?

Not as files. Copy or convert the text from each PDF first, then paste the text into the two boxes.

Is it safe to compare confidential contracts online?

With Text Diff, yes. The comparison runs in your browser and neither text is sent to a server.

Why does every line show as changed?

Usually because of whitespace or line-ending differences from copying between apps. Turn on "Ignore whitespace" and the real changes should stand out.

Have two versions to check? Paste them into Text Diff and see every change in seconds.

Every tool here is free

51 tools for PDFs, images and video, all running in your browser. Create a free account to keep your recent tools on every device.

Keep reading