Skip to content
DayUtils

Text Compare – Find the Differences Between Two Texts

Paste an original and a changed version of any text to see exactly what was added and removed, highlighted word by word or line by line. Use it for contracts, essays, code, lists and any document with more than one version. Nothing is uploaded.

Loading tool…

How to use text compare

  1. Paste the original text into the first box.
  2. Paste the changed text into the second box.
  3. Choose to compare by words or lines, and whether to ignore case.
  4. Read the result below: a summary of how many words or lines were added and removed, followed by the full text with changes highlighted.

Added text is shown in green; removed text in red with a strikethrough. Screen readers announce each change as “added” or “removed”.

Example

Original: “The quick brown fox jumps over the lazy dog.”

Changed: “The quick red fox jumped over the lazy dog.”

Comparing by words shows brown removed and red added, and jumps removed and jumped added — two words changed, everything else the same.

How a diff works

A diff algorithm looks for the longest common subsequence: the largest set of words (or lines) that appear in both texts in the same order. Whatever is left over in the original was removed; whatever is left over in the new text was added. Comparing by words gives fine detail; comparing by lines gives a cleaner overview of large changes.

When to use it

  • Contracts and agreements — spot edits between drafts before signing.
  • Essays and articles — see what an editor or co-author changed.
  • Code and configuration — check what changed between two versions of a file.
  • Translations and subtitles — compare a revised version with the original.
  • Lists and data — find entries added to or removed from a list.
  • Plagiarism checks between two specific texts — see how similar they are.

Tips

  • Clean the text first. Extra spaces and line breaks show up as changes; remove extra spaces before comparing if formatting doesn’t matter.
  • Sort lists first if order doesn’t matter, using sort lines, so only real differences remain.
  • Compare by lines for long documents to get an overview, then by words for detail.
  • Watch for smart quotes and dashes. Text copied from different programs may use “curly” or 'straight' quotes, which count as different characters.

Reading the result

When a sentence was rewritten, you’ll often see a block of red followed by a block of green. That simply means the old wording was replaced by the new wording. Small, scattered changes usually mean light editing, while long runs of colour show substantial rewriting.

Privacy

Many online diff tools upload both documents to a server. This one compares them on your own device, so it is safe for confidential drafts, legal text and unpublished work.

For JSON, format both documents with the JSON formatter and sort the keys before comparing. To find duplicate entries inside one list, use remove duplicate lines.

Frequently asked questions

How do I compare two texts?

Paste the original into the first box and the new version into the second. Differences appear instantly below: additions are highlighted in green and deletions in red with a line through them.

Should I compare by words or by lines?

Words are best for prose — essays, emails, contracts — because small edits are easy to see. Lines are best for code, lists, CSV data and configuration files, where each line is a unit.

Can I ignore capital letters?

Yes. Tick “Ignore case” and differences that are only in capitalisation are treated as the same.

Is my text private?

Yes. The comparison runs in your browser. Neither text is sent to a server, which matters for confidential documents.

How does the comparison work?

It uses a diff algorithm that finds the longest sequence of words or lines the two texts share, then marks everything else as added or removed. This is the same idea behind version-control tools.

Can I compare Word or PDF files?

Copy the text out of each file and paste it in. Formatting such as bold or fonts isn’t compared — only the text itself.

Last updated: