Skip to main content
ToolsBay

Text Compare

Diff two blocks of text and highlight every addition and removal.

Runs entirely in your browser — nothing is uploaded

0 chars · 1 lines
0 chars · 1 lines

Frequently asked questions

What is the difference between word, character and line diff?

Word diff highlights whole words that changed and is the most readable for prose. Character diff highlights individual characters and is precise but noisy. Line diff treats each line as a unit, which is what Git does and what you want for code.

Does "ignore whitespace" change my text?

It only affects the comparison, not what you pasted. Runs of whitespace are collapsed before diffing so a re-indented file does not show every line as changed.

What does the merge panel do?

It lets you pick, line by line, whether to keep the left version, the right version, or both. Applying the merge writes the result back into the left panel.

Is my text uploaded anywhere?

No. The comparison runs entirely in your browser, so you can safely diff contracts, config files or anything else confidential.

Choosing a diff granularity

The three modes answer different questions. Line diff, the mode Git uses, treats a line as atomic — change one character and the whole line reads as replaced. That is exactly right for code, where a line is a meaningful unit, and unhelpful for prose, where a paragraph is one long line.

Word diff is the mode to use for writing. It shows that a sentence changed one adjective rather than reporting the entire paragraph as rewritten. Character diff goes finer still, which is useful for spotting a transposed digit in an ID or a single altered character in a hash — and overwhelming for anything longer.

Ignoring what does not matter

Two options exist because two kinds of difference are usually noise. Case differences matter in code and rarely in prose. Whitespace differences almost never matter and are almost always present — a re-indented file, a change of line endings between Windows and Unix, or a trailing space will otherwise mark every line as changed and bury the one real edit.

Related tools

To clean up a list before comparing it, use remove duplicate lines and sort lines alphabetically — sorting both sides first turns a reordering into no diff at all. To compare formatted code fairly, run both sides through the JavaScript formatter or JSON formatter first.

All text utilities