Compare two texts
Paste two versions and see every added, removed and unchanged word or line.
Differences
removed added
Paste text into both boxes to see what changed.
Related tools
-
Remove duplicate lines
Paste a list, get every line once, with the removed duplicates counted. -
Word counter
Live word, character, sentence and paragraph count as you type. -
Case converter
Ten cases, converted as you type: sentence, Title, camelCase, snake_case and more. -
JSON formatter
Format, minify and check JSON, with the line and column of the first error.
Paste the old version on the left and the new one on the right, and the differences appear underneath: removed runs struck through with a minus sign, added runs underlined with a plus sign, and the counts above them. Compare by line to review a contract or a config file, by word to see which phrase was rewritten, or by character to catch a single typo. Use it to check what an editor changed, to compare two translations, or to find the one line that differs between two versions of a file. Both texts stay in your browser and are kept only on this device, until you clear them.
How to use
- Paste the original text into the left box and the changed text into the right box.
- Choose what to compare: character, word or line. Word is a good default for prose, line for code and lists.
- Switch between side by side and inline, and turn off case or whitespace differences if they do not matter.
- Read the result: minus marks a removed run, plus marks an added one, and the counts above say how much changed.
- Use Copy to take the marked-up diff as plain text, or Clear to empty both boxes.
What it handles
- Windows and Unix line endings count as the same, so a file saved on another system is not reported as changed on every line.
- An emoji, a skin tone sequence or a letter with a combining accent counts as one character, so a run is never cut in half.
- Chinese and Japanese are compared character by character in word mode, because those languages do not separate words with spaces.
- Ignore case and ignore whitespace switch off the differences you do not care about, including indentation and trailing spaces.
- Additions and removals carry a plus or a minus sign and an underline or a strikethrough, so colour is never the only signal.
- Two texts that differ almost everywhere are reported as one replaced block instead of freezing the page.
FAQ
What is the difference between comparing by character, word and line?
Line marks a whole line as removed and its replacement as added, which is how code review tools work. Word finds the words that changed inside a line, so a rewritten sentence shows only the new phrase. Character narrows it further and catches a single typo or a changed digit. Line is fastest on long files; character is the most detailed.
Is my text uploaded anywhere?
No. The comparison runs in your browser, on your device. Nothing is sent to a server and nothing is logged. Both texts are saved in this browser's local storage so you can come back to them on this device, and Clear removes them. Long texts are compared in a background thread, which is still your own browser.
Is there a limit on how much text I can compare?
Each side accepts up to one million characters; above that the tool says so instead of freezing. Only the first two thousand rows or marked runs are drawn, and a line under the result says how many there are in total. Texts that differ almost everywhere are reported as one replaced block, because searching them unit by unit would take minutes.
Why is a whole line marked as changed when I only edited one word?
Because you are comparing by line, and a line either matches or it does not. Switch the granularity to word and the same edit shows only the word that changed, with the rest of the line unmarked. Character granularity goes one step further and marks the individual letters. The counts above the result change with the setting.
How do I tell additions from removals without relying on colour?
Every removed run carries a minus sign and is struck through; every added run carries a plus sign and is underlined. In the line view the sign sits in its own column next to the line number. Screen readers announce the runs as deleted and inserted text. The legend above the result repeats both marks.
Does it work offline?
Yes. Once the page has loaded, the comparison needs no connection, so you can switch off Wi-Fi and keep working. The algorithm ships with the page. The only requirement is that JavaScript is enabled in your browser, because the whole comparison happens there rather than on a server.
Updated