Diff Checker
Side-by-side or unified text diff with word-level highlighting, ignore-whitespace/case toggles, .patch download. LCS-based. Free, offline, client-side, instant, secure.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Compare two text blocks with unified or side-by-side view, word-level highlighting within changed lines, and 3 normalization toggles (ignore whitespace / case / empty lines). A 5,000-line cap keeps it responsive, and the .patch download makes diffs usable in CI and code review.
How to Use Diff Checker
- Paste the original text in the left pane and the modified text in the right pane.
- Pick a view mode: Unified (default - single column with
+/−prefixes) or Side-by-side (two columns with separate line numbers per side, easier for code review). - Toggle normalization: ignore whitespace (collapse runs to single space), ignore case, ignore empty lines. Combine as needed for noise-suppressed comparison.
- For side-by-side, word-level highlighting shows which words changed inside an otherwise-similar line (default on).
- Press Ctrl+Enter to compare. Live preview updates after 300 ms.
- Stats card shows added/removed/unchanged line counts plus change ratio (% of lines that differ).
- Copy or download as
.patchfor paste into GitHub PR descriptions,git applypipelines, or CI tools.
Frequently Asked Questions
Unified vs Side-by-side – when to use which?
Unified (default): single column, GitHub PR / git diff style. Lines marked + (added), − (removed), or space (unchanged). Compact, easier to copy, faster to scan changes. Best for small diffs and code review.
What’s word-level highlighting?
When a line was changed (not purely added or removed), word-level highlighting splits the line by whitespace boundaries and computes a sub-diff. Removed words are struck-through in red on the left, added words shown in green on the right. Common in tools like GitHub PR review and Beyond Compare.
Why a 5,000-line cap?
The Wagner-Fischer LCS algorithm uses O(M×N) memory. For 5k×5k that’s 25 million Int32 cells = 100 MB – within reasonable browser limits. At 10k×10k: 400 MB, typically crashes. At 20k×20k: 1.6 GB, definitely crashes. For larger files use the Myers diff algorithm (O((M+N)·D) where D = diff size – typically much smaller), often via desktop tools like diff, delta, or git itself. This tool is for interactive review of human-scale text changes, not huge log files.
What’s the change ratio stat?
(added + removed) / total diff items × 100. Tells you “how different are these texts at a glance”. 0% = identical. 100% = nothing in common. Real-world examples: spelling-corrected article ≈ 1-5%, refactored function ≈ 20-40%, completely rewritten section ≈ 80%+. Useful for triaging “is this a small touch-up or a major change?” without reading the whole diff.
How does ignore-whitespace work?
For COMPARISON only: collapses runs of spaces/tabs to a single space, then trims leading/trailing whitespace. Two lines that differ only in indentation or trailing spaces will compare as equal. The original line content (with its original whitespace) is what gets DISPLAYED. So output preserves the original look even though comparison ignored the difference.
What does the .patch download contain?
Unified diff format – the same format used by git diff, git apply, GNU patch, GitHub PR descriptions. Three header lines (--- a, +++ b, @@ hunk header) followed by the diff lines with +/−/space prefixes. Can be applied with git apply diff.patch or piped to patch -p1. Useful for: GitHub PR descriptions (drop in a code block), CI pipeline file modifications, recording text changes for issue tracking.
How is this different from git diff?
Git diff: command-line, operates on files in a repository (knowing about HEAD, branches, the working tree). This tool: web-based, operates on text pasted into the browser, no repository concept. Output format is the same (unified diff). Use git diff for actual version-control workflows; use this for ad-hoc text comparison, or when you don’t have access to git, or when comparing snippets from different sources.
Why does my tab-vs-space diff show everything as different?
By default, tabs and spaces are different characters. A tab-indented line and a 4-space-indented line are entirely different. Turn on Ignore whitespace to treat them as equivalent (both collapse to one space). For code review where you specifically care about indent characters, leave it off.
Is my data secure?
Yes. All computation happens in your browser. Texts are not sent anywhere. The clipboard copy uses navigator.clipboard; the download is generated in-memory.
Related Tools
Color Contrast Checker →
WCAG Contrast Checker - 2AA/AAA contrast between text and background. Pastes hex, shows live…
Favicon Checker →
Preview your favicon in browser-tab mockups (16, 32, 48, 180 px), check format and…
Password Strength Checker →
Test how strong a password is with a rating, a meter, and improvement tips,…
Android AssetLinks JSON Generator - App Links →
Android AssetLinks JSON Generator files for Android App Links. Configure package names and SHA-256…
Convert ASCII to Binary →
Convert ASCII to Binary tool. Convert text to binary and binary to text. 100%…
Base32 Encoder/Decoder →
Free Base32 encoder and decoder tool. Encode or decode Base32 strings online. 100% client-side,…
Base58 Encoder/Decoder →
Free Base58 encoder and decoder tool. Encode or decode Base58 strings like Bitcoin addresses.…
Base64 Encoder and Decoder →
Base64 Encoder and Decoder - Convert text strings into Base64 format or decode Base64…
BBCode to HTML Converter →
Generate standard semantic HTML arrays translating classic forum BBCode syntax cleanly explicitly mappings independently…
Convert Binary to Hex →
Convert Binary to Hex tool. Convert binary numbers to hex instantly. 100% client-side, instant,…
Convert BSON to JSON →
Convert MongoDB BSON hex dumps to readable JSON in your browser. Free, offline, client-side…
Chmod Calculator →
Chmod Calculator - Build Linux chmod permissions visually - read/write/execute for owner, group, public,…