Text Diff Checker β Line, Word & Character
Compare two text blocks and see additions, deletions, and changes β switchable between line, word, and character granularity.
Tool code processes selected files and entered content in your browser and does not submit them to a TOOLGRID processing endpoint. TOOLGRID measures tool usage, not the content you enter.
Loading toolβ¦
Browser-basedWhat this tool does
Free 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.
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.
What you can do with this tool
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.
What to check before relying on the result
- Performance and maximum practical input size depend on browser memory, device speed, and the structure of the input.
- Review the generated result before replacing or publishing an original file.
How to use
- 1
Paste the original text into the Before panel and the new text into the After panel.
- 2
Pick a granularity β Line, Word, or Character β using the toggle.
- 3
Scan the highlighted preview and the added/removed/unchanged counters.
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
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.
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.
Trailing whitespace and CRLF-vs-LF differences will register as changes you probably don't care about. Run pasted text through Line Cleaner's Trim whitespace operation first if the source uses inconsistent line endings or trailing spaces.
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
Does 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?
Diff computation runs in your browser. Tool code does not submit entered content or the generated diff to a TOOLGRID processing endpoint. Review browser extensions and device security before handling sensitive material.
Useful next steps
Open a nearby browser tool when you need to validate, convert, or reuse the result.