Text Diff / Compare
Compare two texts in your browser. See line-by-line additions and deletions side by side, with instant stats on what changed.
How to use
- 1
Enter texts
Paste two texts or load them from files.
- 2
Compare
Press "Compare" to compute the line diff.
- 3
Check the results
View the side-by-side or unified diff, then copy or download the Unified diff.
Features
- Side-by-side and unified diff views
- Automatic stats for added, deleted and unchanged lines
- Load text files (one per side)
- All in your browser - nothing is uploaded
Use cases
Review code changes
Compare before and after versions of source code and catch unintended changes.
Check document revisions
Compare the previous draft with the revised text to see exactly which sentences changed.
Diff logs and configs
Line up logs from a healthy run versus a failing one, or config files from different environments.
Details
A text diff compares two versions of text and shows exactly what was added and what was removed. It is a routine part of reviewing code changes, contract revisions, meeting-minutes updates and configuration files - anywhere two versions need to be reconciled.
This tool compares text line by line and finds the minimal edit script with the Myers O(ND) algorithm. Common lines at the start and end are trimmed automatically, so even long texts are diffed quickly and accurately. You can read the result side by side, or as a single-column unified diff.
Everything runs in your browser - the texts you paste are never sent to a server. The result can be copied as a Unified diff, which you can share by email or chat or save as a .diff file.
FAQ
Is the comparison line-based?
Yes. Texts are split on line breaks and compared line by line, classifying each line as added, deleted or unchanged.
How long can the texts be?
Each text is limited to 200,000 characters and 20,000 lines. If your texts are longer, split them into smaller parts.
Can I save the diff as a file?
Yes. Download the result as a Unified diff (.diff) file, or copy it and paste it into email or chat.
Are my texts uploaded to a server?
No. The whole comparison happens in your browser and nothing you enter is transmitted.
Related Tools
Text Converter
Convert case (lowercase, uppercase, title case) and clean up text: remove blank lines, trim spaces, and count characters, lines and UTF-8 bytes.
Kanji Number Converter
Convert between Arabic numerals and Kanji numerals (一, 十, 百, 千, 万).
Full-width / Half-width Converter
Convert between full-width and half-width characters. Handles letters, digits, symbols, spaces, and katakana with voiced marks.
Roman Numeral Converter
Convert between Arabic numerals and Roman numerals (I, V, X and more). Supports 1-3999 and tolerates non-standard forms like clock-face IIII.
All processing happens in your browser. Your files are never uploaded.
Did you know?
Line endings and spaces can change a text comparison. Check the underlying input as well as how it looks.