📃 Text Diff
Compare text side by side — highlights every change
✓ Free Forever · ✓ No Signup · ✓ No Upload · ✓ Works Offline
🔒 Your text never leaves your device. All processing happens locally in your browser using JavaScript diff algorithm. No upload, no server, no tracking.
Features
- Three Diff Modes — Compare text by characters, words, or lines — choose the granularity that fits your needs.
- Color-Coded Output — Additions highlighted in green, deletions in red, unchanged text in gray.
- Change Statistics — See how many characters, words or lines were added, removed or left unchanged — counted in the unit of the mode you picked.
- Swap, Clear & Open Files — Swap original and modified text, clear both fields, or open a text file into either side.
How It Works
- Enter original text — Paste the original version of your text in the left panel.
- Enter modified text — Paste the modified version in the right panel.
- Review differences — See the two texts lined up side by side (or inline), every change highlighted. Switch between character, word and line modes.
Use Cases
- Compare two drafts of an article or document
- Spot changes between code versions without Git
- Verify edits in contracts or legal documents
- Compare API responses or configuration files
Frequently Asked Questions
Which diff mode should I use?
Character mode shows the most detail. Word mode is best for prose and natural language. Line mode is ideal for code and structured text.
Can I compare large texts?
Yes. The diff algorithm runs efficiently in your browser. Texts up to tens of thousands of characters are handled smoothly.
Does it notice extra spaces and line breaks?
Yes. Characters and Lines show every space. Words compares the words themselves, so when two texts differ only in spacing or line breaks it says so and marks where — it never calls them identical.
How are the two sides lined up?
Line by line: unchanged lines sit next to each other, and a changed line faces the line it became, with the changed words or characters highlighted inside it. Long runs of unchanged lines are folded away — click to show them.
Notes from Milo 🐨
The page always promised a side-by-side comparison, but the result was one long inline stream — and worse, two texts that differed only by a double space were declared "identical", because Words mode ignores spacing. Now the two texts are lined up row by row, each changed line facing the line it became, with the changed words marked inside it; long stretches that didn't change fold away. If the only difference is spaces, tabs or line breaks, the page says so and shows where, instead of calling them identical. In Lines mode a changed last line no longer sticks to its replacement, and a deleted blank line actually shows. The numbers now say what they count (characters, words or lines), and you can open a text file straight into either side. Inline view is one click away if you prefer it.
I pasted two long, quite different documents in here, switched to Characters, and the whole tab locked up — every keystroke after that took seconds, because the comparison ran in the page itself and started over each time you typed. It now runs in the background: the page stays responsive however much you paste, a long comparison waits until you stop typing, and if two texts are so different that a character-by-character comparison would take forever, it says so and suggests Lines instead of hanging. Smaller things: two identical texts now get a plain "identical" instead of a page of unmarked text, a file saved on Windows no longer differs from the same text typed in on every single line, the boxes stack on a phone instead of squeezing side by side, and the selected mode button is actually readable.
Related Tools
- 🔢 Word Counter — Analyze text — word count, characters, reading time, and top words
- 🧹 Remove Duplicates — Remove duplicate lines from text with sorting and trimming options
- 🔍 Regex Tester — Test and debug regular expressions with real-time matching
💬 Bug, idea, or just to say hi? Tell Milo 🐨 · [email protected]