Text Diff (compare two texts and see what changed)
Compare two texts line by line or word by word (per character for Chinese and Japanese) with additions, deletions and changes highlighted. View side by side or unified, and copy or save a unified diff.
- Runs in your browser (no upload)
Up to 200,000 characters
Up to 200,000 characters
Comparison
| Line | Original | Line | Changed |
|---|---|---|---|
| 1 | Packing list | 1 | Packing list |
| 2 | Passport | 2 | Passport |
| 3 | Before: Plane ticket ( | 3 | After: Plane ticket (paper ticket) |
| 4 | Charger | 4 | Charger |
| 5 | Before: | 5 | After: Sunscreen |
| 6 | Before: Meet at the lobby at | 6 | After: Meet at the lobby at 8:30. |
Each text can be up to 200,000 characters. When there are very many differences, the amount of work is capped so the page never freezes.
How to use
- Paste the original text on the left and the changed text on the right.
- Choose line or word comparison, side-by-side or unified view, and optionally ignore whitespace or letter case.
- Review the added (green), removed (red) and changed lines, then copy or save the unified diff.
FAQ
What is a "changed" line?
Where removed lines are followed by added lines, they are paired in order as changes and shown next to each other, with the differing words (characters for Chinese and Japanese) highlighted.
How are the texts compared?
With Myers' diff algorithm (which finds the shortest edit script), computed in your browser. When there are very many differences, the amount of work is capped so the page never freezes; part of the result is then shown as a block deletion and insertion, and a notice says so.
What is a unified diff?
The diff format used by diff -u and Git. It includes 3 lines of context around each change and can be used with tools such as patch.
Notes & limitations
- What you enter is processed only on this page and is not sent to YUCTS servers.
- Each text can be up to 200,000 characters, and up to 2,000 rows are shown on screen (the unified diff always contains everything).
- With very many differences, part of the result may be shown as larger blocks instead of the smallest diff.
- Changed lines are paired in order; similar lines are not searched for and matched.
Related tools
- Word & Character Counter (characters, words, lines, paragraphs)Count characters the way people see them (emoji sequences count as one), Chinese/Japanese characters, English words, spaces, line breaks and paragraphs. Updates as you type, right in your browser.
- Reading Time Estimator (silent reading and speech)Estimate how long a text takes to read. Chinese and Japanese are measured in characters per minute, English and other languages in words per minute, and every speed can be adjusted. Results are estimates.
- Whitespace Cleaner (trailing spaces, extra blank lines)Clean up trailing spaces, repeated spaces and blank lines, full-width spaces, tabs and invisible zero-width characters with the rules you choose. Your original text stays intact and a preview marks every change.
- Full-width / Half-width Converter (letters, digits, katakana)Convert digits, letters, symbols, spaces, katakana and CJK punctuation between full-width and half-width, type by type, with exceptions and a preview of every change. Unlike NFKC, nothing else is rewritten.
- Simplified ↔ Traditional Chinese Converter (Taiwan / Hong Kong)Convert Chinese between Simplified and Traditional characters (Taiwan or Hong Kong) with OpenCC dictionaries. Changes are highlighted and characters with several candidates are listed for checking. Runs in your browser.
- Japanese Kana Converter (Hiragana, Katakana, Romaji)Convert between hiragana and katakana (half-width too), turn kana into romaji with modified Hepburn, the 2025 Japanese Cabinet rules or passport style, and romaji back into kana. Long vowels and particles are flagged.