tools / text diff

Text Diff Checker

Compare two blocks of text and see exactly what changed — with word- or character-level highlighting inside each changed line, not just the whole line marked red. Everything runs in your browser.

Original
Changed
Diff

How this diff checker works

The tool first finds the longest common subsequence of lines shared between the two texts using the same core algorithm (Myers' O(ND) diff) behind diff and Git — lines that moved without changing still show as unchanged if they appear in the same relative order. When a line was replaced by another line, rather than just marking both whole lines as changed, a second pass diffs the pair of lines against each other at word or character granularity, so only what actually changed inside the line gets highlighted.

Line, word, or character mode?

Word (the default) highlights just the changed words within a modified line — the best fit for prose, comments, or config values. Character goes finer still, useful for spotting a single typo or a one-character edit inside a longer word or ID. Line only turns off the finer-grained highlighting and marks any changed line as fully added/removed, which some people prefer for code or CSV rows where the whole-line view is easier to scan.

Frequently asked questions

Does a single edited word mark the whole line as changed?

Not by default — in Word or Character mode, only the specific words or characters that changed inside a modified line are highlighted; the rest of the line shows as unchanged. Switch to Line only if you'd rather see the whole line marked as changed instead, matching how tools like git diff present line changes without word-level detail.

Does whitespace count as a difference?

Yes — trailing spaces or different indentation will show as changed, since the comparison is exact at every level (line, word, and character). Trim or reformat both inputs first if you only care about content, not formatting.

When does word/character highlighting not apply to a changed line?

When a block of removed lines and a block of added lines don't line up one-to-one — for example, one line replaced by three — there's no single clear pairing to refine, so those lines fall back to whole-line coloring even in Word or Character mode. A one-for-one line replacement is what gets the finer-grained highlight.

Is my text uploaded when I use this tool?

No. Comparison happens instantly in your browser — nothing is sent to a server.