Diff Checker
Compare two blocks of text line by line. Added lines are highlighted green, removed lines red. Uses an LCS-based algorithm — the same approach as git diff.
How to use
- Paste the original text in the left box and the modified text in the right box.
- Click "Compare" to see the differences highlighted below.
- Green lines are additions, red lines are removals, and gray lines are unchanged.
Frequently asked questions
How does the diff algorithm work?
The diff checker uses the Longest Common Subsequence (LCS) algorithm to find the minimal set of line additions and deletions that transforms the left text into the right text. This is the same approach used by tools like git diff.
Does the diff checker compare characters or lines?
This tool performs line-by-line diffing. Each line is treated as a unit — the comparison is not character-by-character within a line.
Is my text sent to a server?
No. All text comparison happens entirely in your browser using JavaScript. Your text never leaves your device.
Can I diff code files?
Yes. The diff checker works on any text — code, configuration files, documents, or any other content you can paste. It does not have a file size limit for reasonable inputs.