Compare Two Texts Online — Text Diff Checker

Compare two texts online and see what changed. Process: paste original and revised text, pick line, word, or character mode, optionally ignore spaces or fix Windows newlines (CRLF→LF), then highlight adds and deletes in your browser. Example: change "hello world" to "hello there" — word mode shows one replacement.

Green = added · Red = removed

How it works

Paste two versions of a text, pick how fine the comparison should be (line, word, or character), then review green additions and red deletions. Your pasted text stays in the browser and is not uploaded or stored by us. The page may load the open-source jsdiff library from a CDN so the checker can run.

How the comparison works

The checker finds a short list of edits that turn text A into text B (classic diff / Myers-style matching via jsdiff). Pick a mode that matches your task:

  • Line — best for .env, YAML, and code; one changed line lights up as a whole. Fast and easy to scan, but a single-word edit still marks the entire line.
  • Word — best for sentences, emails, and AI prompts; highlights individual words. Clearer for prose, but can split awkwardly on punctuation.
  • Character — best for tiny typos; most precise, but noisy on longer edits.

Ignore spaces hides indent-only edits. Treat CRLF and LF the same stops whole lines lighting up when only the newline style (Windows vs Unix) changed.

Example

Example (word mode): A = "Hello world", B = "Hello there" → one change (world → there). Line mode on three lines where only the middle line differs marks that line as changed.

When to use it

  • Check config changes: compare two .env or YAML snippets line by line.
  • Review prompt edits: use word mode to see which wording was added or removed.
  • Proofread copy or translations: confirm only the intended sentences changed.

Frequently asked questions

Should I compare by line or by word?

Use line mode for code and config files. Use word mode for sentences, emails, and AI prompts — it highlights individual words instead of whole lines.

Is my text uploaded to a server?

Your pasted text is not uploaded or stored by us — comparison runs in your browser. The page may load the open-source jsdiff library from a CDN; that does not send your text to our servers.

Why does a newline-only change mark a whole line red?

Windows uses CRLF and Unix uses LF, so the same line can look different. Turn on “Treat CRLF and LF the same” before comparing.

Can I compare images or binary files?

No. This tool is for plain text only.

References