Need to compare two versions of a document, code file, or article? A diff checker highlights exactly what changed — additions, deletions, and modifications — in seconds.

⚡ Try It Free — No Signup

Works instantly in your browser. No account, no install, no upload.

Open Diff Checker →

What Is a Diff?

A diff (short for difference) is a comparison of two versions of text that shows what was added, removed, or changed. The name comes from the Unix diff command, a staple of software development since 1974.

How to Read Diff Output

Common Use Cases

Diff Algorithms

The standard diff algorithm uses LCS (Longest Common Subsequence) to find the longest shared sequence between two texts, then marks everything outside that sequence as changed. The Myers diff algorithm (used by Git) is a refinement that finds the shortest edit script efficiently.

Command-Line Diff

# Compare two files
diff file1.txt file2.txt

# Side-by-side output
diff -y file1.txt file2.txt

# Ignore whitespace
diff -w file1.txt file2.txt

# Git diff
git diff HEAD~1 HEAD -- myfile.py

Frequently Asked Questions

Can I compare code files?
Yes. The diff checker works on any plain text, including code in any language.
Does it ignore whitespace?
The tool has an option to ignore whitespace differences, useful when comparing code that was reformatted.
Is there a size limit?
No server-side limit — the comparison runs in your browser. Very large texts (thousands of lines) may be slightly slower.
Can I diff Word documents?
Not directly. Copy the text content from each Word document and paste it into the two input areas.

Ready to try it?

Free, instant, and runs entirely in your browser.

Open Diff Checker →