🌐 EN

πŸ†š Diff Checker

Compare two texts side by side, line by line. Added lines are highlighted green, removed lines red, and changed lines get fine-grained word-level highlighting.

GUIDE

Learn more

01

1. What Is a Diff Comparison?

A diff finds the differences between two texts (or files). It's used for code review, comparing document versions, checking config changes, and proofreading translations. Typically compared line by line, it distinguishes added, removed, and changed lines. Git's `git diff` and every code editor's compare feature rely on this same principle. This tool never sends your text to a server β€” everything is compared instantly in your browser, so even sensitive code or documents stay private.

02

2. Line-Level vs Word-Level Comparison

Line-level comparison treats each full line as one unit and decides if it's the same or different. Word-level comparison goes further, pinpointing exactly which words changed within a modified line. For example, if "Hello, nice to meet you" becomes "Hello, thank you", a line-level diff just says "changed", but word-level highlighting shows precisely that "nice to meet" was removed and "thank" was added. This tool automatically layers word-level highlighting onto any changed line.

03

3. Using the Ignore-Case and Ignore-Whitespace Options

When comparing code that only differs in indentation or trailing whitespace, or text that only differs in letter case, these trivial differences can clutter a review and look like meaningful changes. Turning on "ignore whitespace" collapses runs of spaces and trims leading/trailing whitespace before comparing; "ignore case" treats uppercase and lowercase as identical. Both are especially useful when comparing formatter output or manually-typed text with inconsistent casing.

Frequently asked questions

Is my text sent to a server?
No. This tool runs entirely in your browser and never calls a backend API β€” your text never leaves your device.
Why doesn't a changed line show word-level highlighting?
If the line was completely replaced with unrelated content, the LCS (longest common subsequence) algorithm can't match it to a prior line, so it's shown as a plain deletion/addition instead. Word-level highlighting appears only when there's some overlapping content to align.
Can I compare very long texts?
Yes, but you'll see a warning past 50,000 lines. The diff algorithm's cost grows with line count, so extremely large inputs may temporarily slow the browser.
Is my comparison saved anywhere?
Your input is auto-saved to the browser's localStorage so it survives a page reload, but it is never transmitted to another device or server.