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.
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.
Related tools
Compare PDF Files
Devices & media
Compare the text of two PDFs and see what changed on each page.
OpenWord and Character Counter
Everyday
Words, characters, sentences and reading time.
OpenRemove Duplicate Lines
Everyday
Keep each line of a list just once, in its order.
OpenCase Converter
Everyday
UPPERCASE, lowercase, sentence case, title case and more.
OpenJSON Formatter and Validator
Everyday
Pretty-print, minify and validate JSON, with the exact error line.
OpenAbout 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
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.