Text Diff Checker
Free Online Text Diff Checker
Compare two blocks of text side by side and instantly see the differences. Our text diff tool highlights additions in green and deletions in red, making it easy to spot every change between two versions. Perfect for comparing code, documents, configuration files, or any plain text. Everything runs in your browser — no data is sent to any server.
How to Use
Paste your original text in the left text area and the modified version in the right text area. Click the "Compare" button to generate a line-by-line diff. Lines highlighted in red exist only in the original text (deletions), and lines highlighted in green exist only in the modified text (additions). Unchanged lines are shown without highlighting for context.
FAQ
How does the diff algorithm work?
The tool uses a longest common subsequence (LCS) algorithm to compare lines. It finds the longest sequence of matching lines between both texts, then marks everything else as additions or deletions. This gives accurate and readable results for most text comparisons.
Is my text sent to a server?
No. All processing happens entirely in your browser using JavaScript. Your text stays on your device and is never uploaded anywhere.
Can I compare code with this tool?
Yes. The diff output uses a monospaced font and preserves whitespace, making it suitable for comparing source code, configuration files, JSON, and other structured text formats.