What is the Diff Checker?
The Diff Checker is a free browser-based tool that compares two text blocks and highlights every addition, deletion, and unchanged line. Paste your original and changed text, click Compare, and see a colour-coded visual diff in either side-by-side or unified view.
All comparison happens locally in your browser using a Longest Common Subsequence (LCS) algorithm — the same core technique used by git diff. No text is sent to any server.
How to Use the Diff Checker
- Paste your original text in the left input
- Paste your changed text in the right input
- Click Compare
- Switch between Side by side and Unified views using the View selector
- Use Swap to reverse original and changed, then compare again
- Click Clear to reset both inputs
View Modes
Side by side — Shows the original on the left and the modified version on the right. Deletions are highlighted on the left, additions on the right, making it easy to see what was removed and what was added at the same position.
Unified — Shows a single stream of lines with – for deleted lines and + for added lines. Useful for a compact view of changes in shorter files.
Common Use Cases
- Code review — Compare a function or HTML template before and after refactoring to spot unintended changes
- Config diffs — Check what changed between two versions of a
.envor YAML file - Document revisions — See what was changed between two drafts of a specification, a README, or any Markdown file
- Debugging — Compare two API responses to find unexpected differences in output
Frequently Asked Questions
Is this tool useful for binary files or images?
No. The Diff Checker is designed for plain text. Binary content will produce unreadable or misleading output.
How large can the input text be?
The tool runs in your browser’s JavaScript engine. Very large inputs (tens of thousands of lines) may be slow because LCS computation is O(n×m) in the worst case. For very large diffs, a command-line tool like git diff or diff will be faster.
Can I diff JSON or code with syntax highlighting?
Not currently — output is plain text with line-level colour coding. Syntax highlighting is not supported in this version.
For tracking code changes over time, the Git Commands Cheat Sheet covers the essential diff and log commands.