Diff Checker

Compare two texts side by side and highlight differences line by line.

Original Text
Modified Text
Diff Results
Ready — paste texts and click Compare

Frequently Asked Questions

How does the diff algorithm work?+
The tool uses a Longest Common Subsequence (LCS) algorithm to find matching lines between the two texts. It then identifies lines that appear in the original but not the new version (deletions) and lines that appear in the new but not the original (additions). This produces an accurate line-by-line comparison.
What do the colored lines mean?+
Red lines with a minus prefix indicate content removed from the original. Green lines with a plus prefix indicate content added in the new version. Gray lines with no prefix are unchanged context that appears in both versions. This follows the standard diff output format used in version control systems.
Is my data sent to a server?+
No. All comparison happens locally in your browser. The LCS algorithm runs entirely in JavaScript on your device. Your texts are never uploaded or transmitted anywhere, making this safe for sensitive documents, code, and configuration files.
What are common use cases for this tool?+
The tool works well for comparing code versions, configuration files, legal documents, contracts, database migrations, log outputs, and any text-based content. It's particularly useful for code reviews, change tracking, and verifying that changes match expectations before deployment.
Can I compare files with different line endings?+
The tool splits text by newlines and should handle both Unix (LF) and Windows (CRLF) line endings reasonably well. However, if a file has mixed line endings, it could affect the comparison. For best results, ensure both texts use consistent line endings.
What's the difference between this and the Text Diff tool?+
The Diff Checker compares two full texts side by side in separate input areas. The Text Diff tool accepts a single input with two texts separated by "|||" markers. Both perform line-by-line comparison with similar highlighting, just with different input methods suited to different workflows.
Copied!