Text Diff
Compare two blocks of text line by line and see exactly what was added, removed, or unchanged between them.
Recommended Settings
Pro Tips
- •Lines that only moved position but are identical are shown as removed-then-added, since the comparison is line-by-line, not move-aware
- •Green highlights show lines added in the 'Changed' text; red highlights show lines removed from the 'Original'
- •Unchanged lines are shown without highlighting for context
- •For a character-level comparison instead of line-level, use the String Diff tool
Most Popular
Most users paste two versions of a document or config file to quickly spot what changed
When to Use This Tool
Compare two drafts of a document to see exactly what changed.
Spot differences between two versions of a configuration file.
Quickly identify additions and deletions between two versions of writing.
Compare two code snippets when a full version control diff isn't available.
How It Works
Split both texts into individual lines
Compute the longest common subsequence of lines shared between both versions
Mark any lines outside that shared sequence as added or removed, and display everything in order
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by Client-side LCS-based line diff algorithm for optimal performance on modern browsers.
Open Source
Built with verified, open-source libraries. Fully transparent.
Frequently Asked Questions
Does this detect moved lines?
Not specifically - a line that moved to a different position will typically show as removed from its old spot and added at its new one, since the comparison works line by line in order.
Is this comparison case-sensitive?
Yes, lines that differ only in capitalization are treated as different lines.
Is there a size limit?
Yes, each input is limited to 2,000 lines to keep the comparison fast in your browser.
Is my data sent to a server?
No. The entire comparison runs locally in your browser.
What's the difference between this and String Diff?
This tool compares line by line, ideal for documents and code. String Diff compares character by character, better suited for short strings like a single sentence or word.