Text Compare: Find the Difference Between Two Texts

Paste the old and new version of a letter, contract, code or answer and see exactly what changed.

Original text
Changed text
Differences

How to use

  1. Paste the original text on the left and the changed text on the right.
  2. Choose to compare by lines, words or characters.
  3. Read the highlighted differences below; green was added, red was removed.

Good to know

The comparison uses the "diff" library (BSD licence), which finds the smallest set of changes between the two texts. Lines mode is best for code and lists, Words mode for letters and essays, and Characters mode for short strings such as IDs or spellings.

"Ignore case" treats Pune and pune as the same; "Ignore spaces" skips differences that are only spaces or indentation. The counters show how many lines, words or characters were added and removed.

Copy result gives the differences as text: in Lines mode each line starts with + (added), - (removed) or a space (same), the format developers know from patches; in Words mode removed parts appear as [-…-] and added parts as {+…+}. Very large texts may take a few seconds.

Questions

Which mode should I use?

Words for normal writing, Lines for code or lists, Characters for short values.

Can I compare two files?

Yes. Open the first file on the left and paste the second on the right.

Does it work with Hindi?

Yes.

Is my text uploaded?

No. The comparison runs in your browser, so it is safe for drafts and contracts.

Can it compare PDFs or Word files?

Not directly. Copy the text from each file and paste it here.

Last updated: