Text Diff

Compare two blocks of text side-by-side or unified diff. Line and word-level highlighting using Myers algorithm. Runs in your browser — text never uploads.

1.0.0
Version
Auth
Batch

About Text Diff

Comparing two blocks of text — a contract draft against the previous version, two AI-generated outputs, the email you wrote against the email your colleague sent, a CSS file before and after a refactor — is a daily task with two terrible defaults. Either you read both side by side in two windows and try to spot the changes by eye (slow, error-prone), or you use a desktop diff tool (Beyond Compare, Meld, vimdiff) that's overkill for one-off ad-hoc text blocks. Online diff tools work but most upload the text to a server, which is a problem when the text is a draft contract, an unreleased marketing email or anything else sensitive.

This text diff tool runs the comparison entirely in your browser. Paste two blocks into the left and right panels and the diff appears below — toggle between side-by-side (two-column with aligned context) and unified (one column with +/- markers, the format git diff uses). Lines that differ are highlighted in red (removed) or green (added); word-level highlighting within changed lines shows the precise edit so you can see at a glance which word changed rather than re-reading the whole line. Toggle options for ignore whitespace, ignore case, and ignore trailing newlines let you focus on meaningful differences. The summary panel reports added, removed and changed line counts. The whole comparison is JavaScript on the page — text never uploads.

Use it to review a contract revision against the previous draft, compare two AI model outputs side-by-side, diff a JSON config from two environments, spot the actual change in a "minor edit" email someone sent, audit two versions of a regex you wrote, or check a copy-paste landed correctly. No upload means even highly confidential text is safe.

Text Diff Use Cases

  • Reviewing a contract revision against the previous draft for redlining
  • Comparing two AI model outputs to see exactly what wording differs
  • Diffing a JSON or YAML config from two environments to find the prod-only setting
  • Spotting the actual change in a 'minor edit' email someone forwarded
  • Auditing two versions of a complex regex or SQL query for behavioural changes
  • Confirming a copy-paste from one document into another arrived intact
  • Editorial work — comparing draft and final versions of an article paragraph

Text Diff Features

  • Side-by-side and unified diff views — toggle with one click depending on which is easier to read for your case
  • Word-level highlighting inside changed lines pinpoints the exact edit rather than just flagging the whole line
  • Stats panel — added, removed, changed line counts plus character-level summary so you know the scale of the diff
  • Ignore whitespace toggle — strip leading/trailing/internal whitespace before comparing for noise-free results
  • Ignore case toggle — useful when comparing text where capitalisation isn't meaningful (variable names, slugs)
  • Ignore trailing newlines toggle — eliminates the false-positive diff caused by editors adding or removing a final \n
  • All comparison runs as JavaScript in your browser — text never uploads, no signup, works on confidential drafts safely

How to Use Text Diff

Paste your two texts

Drop the original text into the left panel and the new version into the right. Both can be any size from a single line to thousands of lines — the diff scales with the input.

Pick view style

Side-by-side shows the two texts in parallel columns with changes highlighted — good for prose and contracts. Unified shows one column with +/- markers — the git diff format, good for code and config.

Toggle ignore options as needed

Ignore whitespace silences differences caused by extra spaces or different indentation. Ignore case treats 'Foo' and 'foo' as identical. Ignore trailing newlines removes the noise from a file ending with or without a final \n.

Read the diff

Red = removed from the left, green = added to the right. Within a changed line, word-level highlighting narrows the focus to the actual edit. Lines that match are shown for context but not highlighted.

Review the stats

The stats panel reports added, removed, changed line counts and a character-level summary. Useful for quickly seeing whether you have a small targeted edit or a wholesale rewrite to deal with.

Text Diff FAQ

No. The diff algorithm runs entirely as JavaScript on the page. There's no XHR, no fetch, no analytics referencing the input. Open DevTools → Network and watch nothing fire when you paste and compare. This is the right default for contract drafts, unreleased marketing copy, confidential emails — anything where uploading even to a stateless service would be awkward.

No hard limit. Comparisons up to a few hundred KB of text complete in a few hundred milliseconds. Very large inputs (multi-MB log files, large CSV exports) may pause the browser briefly during computation; for those, a desktop diff tool like Meld or Beyond Compare is the right choice.

Line-level marks an entire line as changed if any part of it differs. Word-level looks inside the changed lines and highlights only the words (or whitespace-delimited tokens) that actually changed, leaving the unchanged words plain. Word-level is more readable for prose; line-level is sufficient for code where any change usually matters.

Side-by-side (two columns) is better for prose — contracts, documents, marketing copy — where you want to read both versions in parallel. Unified (one column with +/- markers) is the git diff format and is better for code and config where the change matters more than reading both versions in parallel. Toggle between them with one click.

It normalises whitespace before comparing — collapses multiple spaces into one, removes leading and trailing spaces per line, and ignores blank lines. Useful when you've reformatted code (changed indent width, added/removed blank lines) and want to see only the real edits. Pure-whitespace differences become invisible.

diffchecker.com is functionally similar but uploads your text to its servers — not ideal for confidential drafts. VSCode's diff is excellent for files already in a workspace, but awkward for one-off paste-compare use cases. This tool is the narrowest version: paste two blocks in a browser, see the diff, close the tab. Confidentiality, simplicity, no install.

Zero uploads. Diff is computed in your browser using Myers' diff algorithm.

Original (left)

Modified (right)

Text Diff Tutorial

What This Does

Paste two versions of the same text. The tool runs Myers' diff algorithm (the same algorithm used by git diff) and highlights added, removed, and changed lines side-by-side.

Word-Level Highlighting

When a line is changed (not entirely added or removed), the tool zooms in and highlights just the words that differ. This makes it easy to spot a typo in a long sentence.

Common Use Cases

  • Compare two config files before pushing changes
  • See what changed in a copy/paste from a pull request
  • Review legal or contract text edits
  • Verify log entries are identical across servers
  • Debug content that looks "the same" but isn't (invisible characters, different line endings)

Options

  • Ignore whitespace — compare as if all runs of spaces/tabs were single spaces, and trailing whitespace was stripped
  • Ignore case — Uppercase and lowercase letters are treated as equal
  • Word-level highlight — Inside changed lines, highlight only the differing words

Views

  • Side-by-side — left shows original, right shows modified, aligned
  • Unified — one column with +/- markers, like git diff

Privacy

All diff computation runs in your browser's JavaScript. No text is sent anywhere. This matters for diffing source code, legal docs, or anything sensitive.