Skip to content

Text compare: find the difference between two texts

Paste the original text on the left and the changed text on the right. Added lines show in green, removed lines in red, and the exact words that changed are highlighted. Everything runs in your browser.

Loading tool…

Everything runs on your device. Nothing you add or type is sent to any server.

How to use it

  1. 01

    Paste the older version into Original text and the newer version into Changed text.

  2. 02

    Choose Lines to compare line by line, or Words for running text such as essays and contracts. Tick Ignore extra spaces or Ignore case if those differences don't matter.

  3. 03

    Read the result: green is added, red is removed. Long unchanged parts are folded; tap Show unchanged lines to open them. Copy the difference if you want to share it.

Line and word comparison

Lines mode is best for code, lists, CSV data and settings files. It pairs each changed line with its new version and highlights only the words that differ inside it, so a one-word edit in a long line is easy to spot. Words mode treats the text as flowing prose and marks every inserted or deleted word in place, which suits letters, articles and agreements.

The tool uses the Myers difference algorithm, a well-known method published in 1986, which finds the smallest set of additions and removals that turns one text into the other.

Side by side or unified

Side by side puts the two versions in two columns with line numbers, which is easiest on a computer screen. Unified shows one column where removed lines start with a minus and added lines with a plus, which fits a phone. Phones start in unified view and larger screens in side by side, and you can switch at any time.

Hindi and other languages

Words are split so that Hindi words stay whole, with their matras and conjuncts, so a changed word is highlighted as one word and not as broken pieces. Emoji and country flags are kept whole too. Ignore case affects only scripts that have capital letters.

Limits

Each box takes up to 1,000,000 characters. If two very large texts are almost completely different, the comparison stops after a short time so the page stays responsive, and the tool tells you that part of the result is shown as one block of removal and addition.

Frequently asked questions

Is my text uploaded?

No. Both texts stay on your device and the comparison runs in your browser. Nothing is sent or stored.

Can I compare Word or PDF files?

Copy the text out of the files and paste it here. To get text from a PDF first, you can use our PDF to Word tool.

What does Ignore extra spaces do?

It treats any run of spaces or tabs as a single space and ignores spaces at the start and end of a line, so re-indented or re-spaced lines count as unchanged.