Diff Checker

Compare two texts and find the differences.

How does text comparison (diff) work?

A diff checker compares two blocks of text line by line and identifies exactly which lines were added, removed, or modified between both versions. The algorithm used is similar to tools like Git diff, which uses the Myers algorithm to find the longest common subsequence (LCS) between two texts, guaranteeing the minimum number of changes possible.

Lines marked in red indicate removed content (present in the original text but not in the modified one), lines in green indicate added content (new in the modified text), and unmarked lines are identical in both versions. This visualization greatly facilitates reviewing changes in code, legal documents, or any versioned text.

Practical use cases

Code review: Compare versions of a file before and after making changes to verify you only modified what was necessary. Useful when you don't have Git available or for quick reviews.

Legal documents: Compare versions of contracts, terms of service, or agreements to identify exactly which clauses were modified between versions.

Server configuration: Compare configuration files (nginx.conf, .env, docker-compose.yml) between development and production environments to detect differences.

Editorial content: Compare article drafts to see what changes the editor or proofreader made compared to the original.

Frequently asked questions

Is the comparison case-sensitive?

Yes, this tool is case-sensitive. "Hello" and "hello" are considered different. This is important for source code where capitalization has semantic meaning.

Are whitespace characters compared?

Yes, leading and trailing spaces on each line are considered in the comparison. If you want to ignore whitespace, first normalize both texts by removing extra spaces before comparing.

What's the difference compared to git diff?

Git diff uses similar algorithms but operates on versioned files in a repository. This tool is for quick comparisons of plain text without needing a Git repository. For changes in projects, using git diff is always preferable.

Can I compare entire files?

Yes, you can copy the full content of two files and paste them into each field. For very large files (more than 10,000 lines), the comparison may be slow. In those cases, use command-line tools like diff or meld.

Popular diff tools

ToolTypeBest for
git diffCLIRepository changes
VS Code diffEditorInline visual reviews
MeldGUI3-way comparison
This toolWebQuick comparisons