Skip to content

Compare two texts and find the differences

Paste the original on the left and the new version on the right: removals are marked in red and additions in green, instantly. Use it to check a contract that came back edited, a new draft of an essay, an email, a translation or a code file. Everything is compared in your browser; your texts are never sent to a server.

Works anywhere in the world, wherever you are.

0 lines · 0 characters
0 lines · 0 characters
Compare by
View
Ignore

Type or paste a text on each side to see the differences.

Your texts never leave your device: the comparison runs in your browser, they are not in the Share link and they are not saved. Close or reload the page and they are gone.

About this calculator

How to use it

Type or paste a text into each box (or open a .txt, .md, .csv, .json or code file, or drop it on the box). The comparison updates as you type. “Swap” moves each text to the other side, and “Try an example” loads two versions of a rental agreement so you can see how changes are marked.

Above the differences you get a summary: how many differences there are, how many lines or words were removed, added or changed, and what share of the characters the two texts have in common.

Lines, words or characters

By line: each row shows a line of the original next to the matching line of the new text, with line numbers; changed lines also highlight the words that differ. This is the view of version control tools and the clearest for code, lists and documents with short paragraphs. “Hide unchanged lines” keeps three lines of context around each change.

By word: shows exactly which words were removed or added, even inside a long paragraph. Best for contracts, essays and translations. By character: catches a single changed letter or comma, handy for codes, account numbers and names.

“Side by side” puts the texts in two columns; “One column” merges them, with removals struck in red and additions in green, which is easier on a phone.

Ignoring case or spacing

With “Upper and lower case”, “Contract” and “contract” count as the same. With “Spaces and line breaks”, a double space, a tab or a paragraph wrapped at a different point is not a difference: useful when a text went through Word, an email or a PDF and changed shape but not content.

Windows and Mac or Linux line endings always count as the same, and a text ending with or without a final blank line is not counted as a change.

How it works

The tool uses Eugene Myers' algorithm (1986), the same kind of method Git and the diff command use: it finds the shortest way to turn one text into the other, the fewest removals and additions. It compares line by line first, then word by word or letter by letter inside each block that changed.

“Copy diff” and “Download .diff” give you the result in unified format (the one diff -u and Git use), with lines starting with “-” and “+”, ready for an email, a ticket or a patch tool.

Important limitations

  • It compares plain text: it does not open Word or Excel files (copy and paste their contents). For PDFs, use the PDF compare tool.
  • It does not detect paragraphs that only moved: they show as removed in one place and added in another.
  • Each side takes up to 1,000,000 characters (about 300 pages). If two huge texts are very different, some blocks are shown as replaced whole to keep the browser responsive, and the tool says so.
  • Your texts are not saved: reload the page and they are gone.

Frequently asked questions

No. The comparison runs in JavaScript in your own browser. The texts are not sent, not saved and not in the Share link, which only carries the view options.

Copy the text of each document and paste it into a box. To compare PDFs, use the PDF compare tool, which reads the text of each file in your browser.

It is the share of characters the two texts have in common according to the comparison (the Dice coefficient): 100% is identical and 0% means nothing in common. It tells you at a glance whether the edits are small or a rewrite.

Only between two texts you paste: it shows which parts match and which changed. It does not search the web or other sources, so it is not a plagiarism detector.

Yes. Use line mode, which shows line numbers, and download the .diff if you need to share it or apply it as a patch. Text files open with the “Open a text file” button.

This calculation runs in your browser and is never sent to a server. Your last values may be saved on your device only, for convenience. Results are estimates and are not financial, tax, accounting or legal advice.