Text Diff Checker — Line, Word & Character
Compare two text blocks and see additions, deletions, and changes — switchable between line, word, and character granularity.
Why use this tool
01Free in-browser text diff tool. Paste a Before and an After version, and the tool highlights every added, removed, and changed segment. Toggle between three granularities: Line (whole-line diff), Word (token-level diff with inline highlighting), and Character (per-character diff). Useful for reviewing edits, comparing configs, and spotting subtle changes.
Paste your original text on the left, the new version on the right. The tool computes the diff using a Myers algorithm and highlights what was added, removed, and unchanged — with a counter for each category.
Three granularity modes: Line shows whole-line changes (the default, good for code, config, and lists). Word mode highlights changed tokens inline within each line — much easier to read for prose edits where most lines changed in small ways. Character mode goes finer for tracking tiny differences in tokens, identifiers, or one-character bugs.
Especially useful when reviewing copy edits, content rewrites, code review snippets that didn't fit a real PR, JSON / YAML config drift between environments, or A/B variations of the same message.
Runs entirely in your browser. Sensitive content — internal docs, draft contracts, log dumps — never leaves your device. For string find-and-replace across a single document, see our Find and Replace; for cleaning up before diff, see Trim Whitespace or Remove Duplicate Lines.
How to use
02Quick checks before you copy
03Confirm the input is the format you intended.
Scan the result before using it in a document, URL, config, or message.
Copy only the output you need.
Use Cases
Paste the original article and the proposed edit. Switch to Word mode and every changed phrase pops out — much faster than re-reading the whole piece.
Paste prod's config on one side and staging's on the other. Line mode shows lines that differ; Word mode shows which value within a line moved. A quick way to investigate "why does staging behave differently?"
When a bug shows up only in one environment, paste two log windows side by side. Line mode surfaces missing or extra events; Char mode finds single-byte differences in similar-looking lines.
For a tiny patch that didn't go through a real PR (one-off scripts, prompts in a doc, query strings), paste the before/after into the tool and use Char mode to confirm only the intended characters changed.
When experimenting with prompt tweaks, paste two outputs and run a Word-mode diff to see exactly what changed — useful for evaluating whether a prompt-side change had the intended effect.
Tips & Tricks
- 01Use Word mode for prose, Line mode for code
Prose tends to change at the word level ("a quick brown fox" → "the speedy brown fox"); Line mode would mark the whole line as changed, drowning the signal. Code tends to change in whole-line blocks (add/remove/rewrite a line); Word/Char mode would create visual noise. Match the mode to the content.
- 02Character mode is great for spotting typos
When two strings look identical but behave differently, paste them in and run Char mode. Smart quotes vs straight quotes, en-dashes vs hyphens, and trailing whitespace become visible immediately — a class of bug that's otherwise invisible.
- 03Trim trailing whitespace first
Trailing whitespace and CRLF-vs-LF differences will register as changes you probably don't care about. Run pasted text through Trim Whitespace first if the source uses inconsistent line endings or trailing spaces.
- 04The counters tell you scope, not severity
10 changed lines might be one typo fix repeated everywhere or a wholesale rewrite. Always scan the highlighted preview, don't just read the counters.
FAQ
04Does the diff support character-level granularity?
Yes. Use the granularity toggle to switch between Line (whole-line diff), Word (token-level inline diff), and Character (per-character diff). Char mode is the right tool for spotting single-character changes — smart quotes, missed punctuation, identical-looking but Unicode-different characters.
Can I compare code, JSON, or YAML?
Yes. Paste any text content — code, structured data, config, or prose. Line mode is best for code and JSON (where indentation and line structure matter). Word/Char modes are useful when you want to see exactly what changed within a long line.
What do the added / removed / unchanged counters represent?
The counters reflect line counts (always lines, even when you're viewing word- or char-level granularity). Added = lines present only in the After text; Removed = lines only in Before; Unchanged = lines present in both. Use them as a quick magnitude check.
Is there a side-by-side view as well as a unified view?
The two input panels are side-by-side. The diff preview shows a unified format (added lines prefixed +, removed lines prefixed -, with inline highlights for Word/Char modes). For purely visual side-by-side diffs of large code blocks, a code editor extension (VS Code's built-in diff viewer, for example) is usually more ergonomic.
How does the diff algorithm work?
It uses a Myers diff at the chosen granularity (lines for Line mode, tokens for Word, characters for Char). Myers is the same algorithm Git uses internally, so the change boundaries should feel familiar if you read git diff regularly.
Is anything sent to a server?
No. Diff computation runs entirely in your browser. Paste sensitive content (drafts, internal docs, customer data) without worrying — neither the input nor the diff result is transmitted or logged.
Related tools
03Find and Replace Text Online→
Replace every match in pasted text — case-sensitive toggle, instant match count, nothing leaves your browser.
Remove Duplicate Lines→
Remove repeated lines while preserving order.
Trim Whitespace→
Trim extra whitespace from text lines.