Text Diff
Compare two text blocks and find added, removed and changed lines.
Text A
Original text
Text B
Modified text
About Text Diff
Text Diff compares two blocks of text line by line and highlights lines that were added or removed. It can be useful for comparing source code, configuration files, SQL queries, documentation and other text-based content.
How to use Text Diff
- Paste the original text into Text A.
- Paste the modified text into Text B.
- Click Compare Text to compare both versions.
- Review the added, removed and changed line counts.
- Check the detailed diff output below the summary.
What is a Text Diff?
A text diff is a comparison between two versions of text. It identifies lines that remain the same, lines that were added and lines that were removed between the two versions.
Text comparison tools are commonly used when reviewing code changes, comparing configuration files, checking document revisions and identifying changes between two text versions.
Difference Types
Added, Removed and Changed Lines
Added lines are displayed with a plus sign and green styling. Removed lines are displayed with a minus sign and red styling. Lines that are replaced between versions contribute to both the added and removed counts, and the Changed count represents the smaller of those two counts.
When should you use Text Diff?
- Compare two versions of source code.
- Review changes in configuration files.
- Compare SQL queries or database scripts.
- Check revisions of documentation or plain text.
- Find changes between two generated text outputs.
Text Diff vs JSON Diff
Text Diff compares text line by line, making it useful for source code, documents and other plain-text content. JSON Diff is designed specifically for comparing structured JSON data and can identify differences based on JSON object properties and paths.
Is my text uploaded to a server?
No. The comparison is performed directly in your browser using the text entered on this page. The tool does not need to upload your text to a backend server.
Input Limit
Each text input supports up to 100,000 characters. For very large documents, comparison performance can depend on your browser and device.