Loading…
Loading…
Compare two texts and spot every difference instantly
Run your projects on Claude Code?
We packaged the .claude config that runs this site — 26 specialist agents, 14 workflow skills, and 6 rule files from 31 real production incidents. From $9.
Get the Claude Code Production Pack — $29The diff algorithm is a fundamental tool in software development, underpinning git diff, code review tools, document version history, and configuration management. Properly diffing two pieces of text requires solving the Longest Common Subsequence (LCS) problem — finding the maximum set of lines common to both inputs so that the minimum number of additions and removals can be identified. A good diff viewer surfaces these changes with enough context to understand why a line changed, not just that it changed.
The comparison engine uses the Myers diff algorithm, the same algorithm at the core of Git and most Unix diff utilities. Myers's algorithm finds the shortest edit script (minimum number of line insertions and deletions) that transforms the original text into the modified text. Its time complexity is O(ND) where N is the total number of lines and D is the edit distance, making it fast for typical source code and configuration file sizes.
The output is rendered in three modes. Side-by-side (split) view renders original and modified text in two synchronized scrolling columns with line numbers and color-coded changes. Unified view renders the classic +/- interleaved format with 3 lines of context around each changed block. Inline view renders changes character-by-character within each modified line, showing exactly which words were inserted or deleted.
The whitespace normalization options preprocess each line before comparison: trimming trailing whitespace, normalizing runs of internal whitespace to a single space, and optionally lowercasing all characters. Blank line skipping removes lines that contain only whitespace before the comparison, reducing visual noise in config file diffs.
A developer compares two versions of a Nginx config file before deploying a routing change, using "ignore whitespace" to focus on meaningful rule differences.
A QA engineer diffs the API contract document against the implementation spec to identify fields that were added or removed without a changelog entry.
A tech lead reviews an AI-generated code refactor by pasting the before and after into the diff tool to verify only the intended logic changed.
A writer compares two drafts of technical documentation side by side to review copyediting changes before publishing.
Paste your original text in the left panel
Paste the modified text in the right panel
View the diff below — green for added, red for removed lines
Switch between side-by-side, unified, or inline views. Download as .diff file.
About the Diff Checker
The tool uses a Longest Common Subsequence (LCS) algorithm for accurate line-by-line matching. This is the same approach used by Git and other version control systems.
Yes. Toggle "Ignore whitespace" to skip spacing differences, "Ignore case" for case-insensitive comparison, and "Ignore blank lines" to skip empty lines.
Yes. Click the ".diff" button to download the unified diff in standard patch format, compatible with Git and other tools.
No. All comparison happens 100% in your browser. Your text never leaves your device.
Side-by-side (split) view shows original and modified text in two columns, making it easy to scan both versions simultaneously. Unified view interleaves additions (+) and removals (-) in a single column with context lines around changes, which is the format Git uses by default and is more compact for large files.
Yes. Toggle "Ignore whitespace" to suppress differences caused by tabs vs. spaces, trailing spaces, or indentation changes. This is especially useful for comparing code formatted by different auto-formatters like Prettier and Black.
The downloaded .diff file is in unified diff format, compatible with Git's patch format. It can be applied to a file using git apply or the Unix patch command. Each changed block includes 3 lines of context by default, matching Git's default behavior.
Builder/critic agent prompts with brakes built in
Open →DeveloperFormat, validate & diff JSON — runs entirely in browser
Open →DeveloperTest regex live — railroad diagrams + plain English explained
Open →DeveloperOne color in, full design system out
Open →