๐Ÿ“š Text tools ยท Guide

How to Compare Two Texts and Find Every Difference (Text Diff Guide)

Compare two versions of a document, contract, code or list line by line and see exactly what was added or removed. A practical guide to using a free text diff checker.

By RexBD Team 24 Nov 2026 8 min read 1,578 words
How to Compare Two Texts and Find Every Difference (Text Diff Guide)

Someone sends back a contract with "just a few small changes". A colleague edits your report. A website's terms and conditions are updated. A configuration file stops working after someone tweaks it. In every case, you need to know exactly what changed, and reading two long documents side by side is slow and unreliable. The human eye is very bad at spotting a changed number in paragraph seven.

A text diff checker does it in a second. It compares two pieces of text and highlights every line that was added, removed or changed. This guide shows you how to use the free Text Diff Checker on RexBD and how to get clear, useful results.

What "diff" means

"Diff" is short for difference. The term comes from a Unix program called diff, written in the 1970s, which compared two files and listed the changes. Programmers have used diff tools ever since to review code changes, and version control systems such as Git are built around the same idea.

The basic method is to find the longest sequence of lines that both texts have in common, then mark everything else as added or removed. The result shows you the smallest set of changes that turns the first text into the second.

๐Ÿ†š Free tool ยท no sign-upTry the Text Diff CheckerCompare two texts line by line and see what was added or removed. Open tool โ†’

How to use the Text Diff Checker

Step 1: Paste the original text

Open the Text Diff Checker and paste the older or original version into the first box.

Step 2: Paste the new version

Paste the newer or edited version into the second box.

Step 3: Compare

Run the comparison. The tool shows the texts line by line. Lines that exist only in the original are marked as removed. Lines that exist only in the new version are marked as added. Lines that are the same in both are shown without highlighting.

Step 4: Review each change

Work through the highlighted lines from top to bottom. Each one is a change you should understand and accept, or question.

Everything happens in your browser. Neither text is uploaded, which matters when you compare contracts, financial figures, unpublished writing or code that contains private settings.

Getting cleaner results

A diff tool compares exactly what you give it. A few preparation steps make the output much easier to read.

Put each sentence or item on its own line

The comparison works line by line. If a whole paragraph is one long line and you change one word, the entire paragraph shows as changed. For prose documents, it often helps to split long paragraphs so that each sentence is on its own line before comparing. Then only the sentence that changed is highlighted.

Clean up spacing first

Extra spaces at the end of lines, tabs versus spaces, and different line endings can all make lines look different even when the visible text is identical. If you only care about real wording changes, tidy both versions with the Whitespace Remover before comparing.

Copy plain text, not formatting

Copying from Word or a PDF can bring hidden characters and odd line breaks. If the PDF breaks every line in the middle of a sentence, join the lines with Remove Line Breaks first, then split into sentences.

Sort lists before comparing if order does not matter

If you compare two lists of names, products or email addresses and the order is not important, sort both with Sort Lines first. Otherwise, the same items in a different order will show up as many changes.

Ad Kothay

Real situations where a diff checker saves time

Reviewing contract changes

When a client or supplier returns an edited agreement without tracked changes, paste your version and theirs into the diff checker. You immediately see every changed clause, number and date. This is one of the most valuable uses, because small edits to payment terms, deadlines or liability clauses can matter a lot. A diff checker is not legal advice, of course, but it makes sure nothing slips past you.

Checking edits from an editor or colleague

Writers can compare their draft with the edited version to learn what was changed and why. Teachers can compare a student's revised essay with the first draft.

Comparing website policies

When a service updates its terms of service or privacy policy, save the old version and compare it with the new one to see exactly what changed.

Debugging configuration files

If a website or app stopped working after a change to a settings file, compare the working version with the broken one. The difference usually points straight at the problem, such as a missing comma, a changed path or a wrong value.

Comparing code snippets

Developers can quickly compare two versions of a function, a SQL query or a JSON file without opening a full development environment. For JSON specifically, the JSON Diff tool compares structure and values even when keys are in a different order. Format both versions with the JSON Formatter first for the clearest result.

Checking data exports

Compare yesterday's export of a product list or price list with today's to see which items were added, removed or repriced.

Catching copy-paste mistakes

After moving text between systems, such as from a document into a website editor, compare the original and the pasted version to make sure nothing was lost or altered.

Reading diff results correctly

A few things often confuse people the first time:

  • A changed line shows as one removal plus one addition. If you change one word in a line, the old line appears as removed and the new line as added. Compare the two lines to spot the exact word.
  • Moved text shows as removed in one place and added in another. A line diff does not know that a paragraph was moved; it sees it disappear and reappear.
  • Blank lines count. Adding or removing an empty line shows as a change.
  • Case matters. "Total" and "total" are different. Use the Case Converter on both versions if you want to ignore case.

Diff checker versus tracked changes

Word processors such as Microsoft Word and Google Docs have tracked changes and version history, which record edits as they happen. Those features are excellent when everyone uses them. A diff checker is useful when:

  • The other person did not use tracked changes.
  • You have two separate files, emails or exports, not one document with history.
  • The text lives outside a word processor, such as on a web page, in an email, in a spreadsheet column or in code.
  • You want a quick check without opening special software.

Word also has a built-in Compare Documents feature for .docx files, which is worth knowing about for formatted documents.

A worked example: a changed price list

A shop owner receives a new price list from a supplier as a long email with one product per line. Last month's list is saved in a note. Instead of reading both lists side by side, the owner pastes last month's list into the first box and the new one into the second, after sorting both alphabetically with Sort Lines.

The diff shows six changes. Four products have new prices, appearing as one removed line (old price) and one added line (new price). One product is missing from the new list, shown only as a removed line, which means it may be discontinued. One new product appears only as an added line. In under a minute, the owner knows exactly which shelf labels to update, which product to ask the supplier about, and which new item to consider stocking. Reading the lists manually could easily have missed one of those changes.

A careful review routine for important documents

For contracts and other high-stakes text, follow a simple routine:

  1. Get both versions as plain text.
  2. Put each sentence or clause on its own line in both.
  3. Remove trailing spaces and extra blank lines.
  4. Run the diff.
  5. Make a list of every change with its location.
  6. For each change, decide: accept, reject or discuss.
  7. Pay extra attention to numbers, dates, names, "and/or", "shall/may" and negative words such as "not".

That last point is important. A single inserted "not" or a change from "shall" to "may" can reverse the meaning of a clause, and both are easy to miss when reading normally.

Our practical uses of a text diff checker article covers more examples for writers, lawyers and developers.

Frequently asked questions

Is my text uploaded when I compare?

No. The comparison runs in your browser, so both texts stay on your device.

Can I compare Word or PDF files?

Copy the text from each file and paste it into the two boxes. Formatting is ignored; only the words are compared.

Why does a whole paragraph show as changed when I edited one word?

Because the comparison works line by line and the paragraph is one line. Split long paragraphs into sentences, one per line, for more precise results.

Does it compare Bangla text?

Yes. It compares Unicode text in any language.

Can it ignore spaces and capital letters?

Clean both texts first with the Whitespace Remover and, if needed, the Case Converter, then compare.

Is the Text Diff Checker free?

Yes. It is free, needs no sign-up and works on any device.

Found this useful?Share it with a friend or colleague who needs it.

Keep reading

More text tools articles
321 free tools, one placeSEO, text, images, code, money, units and design. Private, fast and almost all in your browser.
Ad Kothay