Diff Checker
Compare two blocks of text and see the differences highlighted. Supports line-by-line and word-by-word diff modes with unified and side-by-side views. Ignore whitespace and case differences.
Diff Checker Tips
Word-by-word mode
Switch to Word mode to see exactly which words changed within a line, not just that the line is different.
Ignore whitespace
Toggle this to skip indentation and trailing space differences — useful when comparing code reformatted by different editors.
Side-by-side view
Use side-by-side to visually align original and modified text. Great for code reviews and comparing config files.
Swap panels
Click Swap Panels to flip original and modified text. Useful when you pasted them in the wrong order.
Copy diff output
Copy the unified diff output to share with teammates or paste into a pull request comment.
All processing is local
Your text never leaves your browser. The diff runs entirely in JavaScript — no server, no uploads, completely private.
Frequently Asked Questions
What is a diff checker?
A diff checker compares two blocks of text and highlights the differences between them. It shows which lines were added, removed, or remain unchanged. This is essential for comparing code versions, configuration files, documents, and any text where you need to track changes.
What is the difference between line-by-line and word-by-word diff?
Line-by-line diff highlights entire lines that have changed. Word-by-word diff goes further by highlighting the specific words that differ within changed lines, making it much easier to spot small edits in long lines of code or text.
What is the difference between unified and side-by-side view?
Unified view shows all changes in a single column with + and - prefixes, similar to git diff output. Side-by-side view shows the original and modified text in two columns, making it easier to visually compare corresponding lines.
What does “ignore whitespace” do?
When enabled, the diff checker trims leading and trailing whitespace from each line and collapses multiple spaces into one before comparing. This is useful when you only care about content changes and want to ignore formatting differences like indentation changes.
Can I compare code files?
Yes. This diff checker works with any text including source code, configuration files, JSON, XML, CSV, and plain text documents. It preserves formatting with a monospace font and supports syntax-aware word-by-word comparisons.
Is my data processed on a server?
No. The diff algorithm runs entirely in your browser using JavaScript. Your text never leaves your device. The comparison uses a Longest Common Subsequence (LCS) algorithm to produce an optimal diff.