Text Diff Checker
Compare two blocks of text and see line-by-line differences highlighted. Download as .patch file.
Text Diff Checker
Compare two blocks of text and see the line-by-line differences highlighted in green (added), red (removed), and gray (unchanged).
Original
Modified
FAQ
What algorithm does this tool use?▼
The diff uses the Longest Common Subsequence (LCS) algorithm, comparing line by line. The result is similar to the output of the Unix diff command.
What does the patch output represent?▼
Lines starting with + were added in the modified version. Lines starting with − were removed. Lines with a space are unchanged. This format is compatible with the Unix patch command.
Is there a file size limit?▼
All processing happens in your browser. Very large inputs (>1 MB) may slow the comparison. For huge files, use a dedicated diff tool like git diff.
Frequently Asked Questions
What algorithm does this diff tool use?
The tool uses a Longest Common Subsequence (LCS) algorithm for line-by-line comparison, producing results similar to the Unix diff command.
Can I compare code files?
Yes. Paste the contents of any text or code files. The tool highlights added lines (green), removed lines (red), and unchanged lines.
Can I download the diff as a patch file?
Yes. Click Download to save the diff as a standard .patch file compatible with git apply, patch, and other diff tools.