Text Diff Checker
Compare two texts and see every added, removed, and changed line or word.
Text Diff compares two versions of a text and shows exactly what changed: lines that were added, removed or edited, down to the individual words. Everything runs in your browser, so drafts, contracts and code never leave your device.
How to compare two texts
- Paste the original version on the left and the changed version on the right.
- The differences appear straight away below - no button to press.
- Choose whether to compare by lines, words or characters, and switch between a side-by-side and an inline view.
Lines, words or characters?
- Lines is best for code, lists and structured documents. Edited lines are paired up side by side, with the changed words inside them highlighted.
- Words suits prose: it shows a rewritten sentence as a few swapped words instead of a whole changed paragraph.
- Characters catches the smallest edits - a changed digit in a number, a missing letter, or swapped punctuation.
Ignoring case and whitespace
Ignore case treats "Hello" and "hello" as the same. Ignore whitespace skips differences in spaces and indentation, which is handy when one version was re-formatted or copied from a PDF. Lines that differ only in those ways are then shown as unchanged.
How it works
The comparison uses Myers' diff algorithm - the same approach behind git diff - via the open-source jsdiff library. It finds the smallest set of insertions and deletions that turns the original into the changed text, which is why the highlighted changes match what a person would point out. In line mode you can also copy the result as a standard unified patch.
Frequently asked questions
Is my text sent anywhere?
No - the comparison runs entirely in your browser and nothing is uploaded or stored.
How large can the texts be?
Documents of thousands of lines compare instantly. If two very large texts are almost completely different, the tool stops after a moment instead of freezing your browser and asks you to compare smaller parts.
Can I compare code?
Yes - line mode with line numbers is built for it, and "Copy as patch" gives you a unified diff you can apply with git apply or patch.
Related tools
Count words and analyze readability with the Word Counter & Text Analyzer, tidy up JSON with the JSON Formatter, or browse the rest of the Text & Data tools on NeatSize.
Runs entirely in your browser - nothing you enter or upload is sent to a server.
Need it to do something else? Request a tool