📄 Text Diff

Paste two plain-text blocks then compare line-by-line with word-level inline highlighting.

About Text Diff

Paste two blocks of plain text — source code, config files, prose, or anything — to get a side-by-side split view highlighting exactly which lines were added, removed, or changed. Changed line pairs get word-level inline highlighting so you can spot typos and small edits at a glance.

How to use

  1. Paste the original text in the left panel.
  2. Paste the updated version in the right panel.
  3. Click 🆚 Compare to run the diff.
  4. Toggle Show unchanged lines to add context around each hunk.
  5. Use 📋 Copy diff to copy a +/- formatted summary.

Common use cases

  • Spotting differences between two versions of a config file.
  • Reviewing what changed in a copied-and-pasted code snippet.
  • Comparing two drafts of a document or email.
  • Verifying that a search-and-replace only touched the lines you intended.

Tips

  • Tick Ignore whitespace when only indentation changed and you care about content only.
  • Amber lines are changed — the specific words that differ are highlighted brighter within the line.
  • Scroll either panel; the other follows when Lock scroll is checked.

FAQ

How is this different from JSON Diff?
JSON Diff understands JSON structure — it compares keys, values, and nested objects semantically. Text Diff is format-agnostic: it diffs any two plain-text files line by line, so it works on code, prose, config files, or anything else.
What does 'Ignore whitespace' do?
When checked, leading and trailing whitespace on each line is trimmed before comparing. A line that only changed indentation won't show as modified.
What does 'Show unchanged lines' do?
By default only changed lines are shown (like git diff --unified=0). Enabling this option also renders unchanged context lines between hunks so you can see where each change sits.
What format does 'Copy diff' produce?
A plain +/- prefixed text block: lines prefixed with + were added, - were removed, and unchanged context lines (if shown) have no prefix. It's human-readable without any special tooling.
Does any text leave my browser?
No. The comparison runs entirely in your browser using a vanilla-JS LCS algorithm — there's no upload, no server, no network request of any kind.

More tools

JSON

Code

Ornaments

Image

Web / SEO

Generators

PDF