Diff Checker
Paste two pieces of text and see the differences highlighted.
Diff
How to use
- Paste the original text into Text A.
- Paste the changed version into Text B.
- Pick Lines for code/config or Words for prose.
- Toggle Ignore whitespace or Ignore case if invisible changes are adding noise.
- Read the highlighted output below — green is added, red is removed.
What does it do?
The Diff Checker compares two pieces of text and shows exactly what was added, removed, or left unchanged. Lines mode treats each line as a unit — ideal for source code and config where a whole line typically changes at once. Words mode splits on whitespace and is better for prose where you care about token-level edits.
Example
Text A:
function greet(name) {
console.log("Hello, " + name);
} Text B:
function greet(name) {
if (!name) name = "world";
console.log(`Hello, ${name}!`);
} Diff in line mode:
function greet(name) {
+ if (!name) name = "world";
- console.log("Hello, " + name);
+ console.log(`Hello, ${name}!`);
} Why do lines show as changed when they look identical?
- CRLF vs LF line endings. Windows files end lines
with
\r\n, Unix files with\n. Even a single-char difference flags every line. Fix by enabling Ignore whitespace or normalising withdos2unix/ editor settings. - Trailing spaces.
fooandfoodiff unless whitespace is ignored. A config-file save that strips trailing spaces will make every touched line look changed. - Tabs vs spaces. A reformat that swaps tabs for spaces (or vice versa) makes every indented line look different in exact-match mode.
- Byte-order mark (BOM). Files saved as UTF-8 with
BOM start with an invisible
. That first "line" will always appear changed when diffed against a BOM-less file. - Smart quotes or non-breaking spaces. Pasting from a
word processor can swap
"for"or a regular space for. They look identical but are different code points. - Ignore-case expectation.
APIandapiare different strings unless you turn on Ignore case.
Is my data private?
Yes. We don't save any of the text you compare here. Nothing is stored or logged, and both the "before" and "after" inputs are discarded the moment you close or refresh the page. There's no record on our side of what you diffed. Feel free to verify in your browser's developer tools.
Frequently asked questions
What is the difference between line and word mode?
Line mode compares text one line at a time — if any character on a line changes, the whole line is flagged as removed from A and added in B. Word mode splits on whitespace and shows a more granular diff, which is better for prose. For source code and config files, line mode is almost always what you want.
Why do identical-looking lines show up as changed?
Usually one of three invisible differences: line endings (CRLF on Windows vs LF on Unix), trailing spaces, or a byte-order mark (BOM) at the start of the file. Turn on "Ignore whitespace" to skip the first two. For BOMs, open the file in a hex editor or strip the leading bytes before pasting.
Does it diff character-by-character?
No. In line mode it diffs per line; in word mode it diffs per whitespace-separated token. Character-level diffs produce noisy output for most real text. If you need character-level comparison for short strings, paste them into word mode — each character will effectively be its own token if there are no spaces.
How large can the inputs be?
The diff runs in memory, so the practical ceiling is your browser's RAM. Up to a few MB per side works fine; tens of MB may freeze the tab briefly because rendering the highlighted HTML is slower than the diff itself. For very large files, run diff locally with GNU diff or git diff.
Can I ignore case or whitespace?
Yes — both are toggles in the toolbar. "Ignore whitespace" treats any run of whitespace as equivalent, which is handy for reformatted code. "Ignore case" treats "Hello" and "hello" as the same. The underlying matches still show the original text; only the comparison is relaxed.
Do you save the text I paste into the two boxes?
No. We don't keep anything you paste here — neither the "before" text nor the "after" text. Whatever you compare is discarded as soon as you close or refresh the page. No logs, no analytics on your content. If you want extra reassurance, your browser's developer tools will show you what's going on.