All tools

Text Diff / Compare

Compare two texts line by line, highlighting added and removed parts

+ 0 Added0 Removed= 1 Unchanged

How it works

Text Diff / CompareCompare two texts line by line, highlighting added and removed parts. All processing happens in your browser — no upload, no signup, no email required. Free forever.

Last updated:

About Text Diff / Compare

Text Diff compares two pieces of text and highlights exactly what changed — additions in green, removals in red, unchanged context in grey. Paste an original on the left, a modified version on the right, and a unified or split diff appears instantly so you can review edits at a glance.

It is the fastest way to compare two drafts of an essay, two versions of a contract clause, two log files or two configuration snippets when you do not have a Git repository or specialised diff app on hand. Editors, lawyers, developers and translators all use it for quick visual reviews.

Comparison runs entirely in your browser — neither side of the diff is sent to any server. Confidential documents, draft contracts and unreleased source code stay on your machine.

How to use Text Diff / Compare

  1. Paste the older or original text into the Original (left) panel.
  2. Paste the newer or modified text into the Modified (right) panel.
  3. Pick the View mode: Unified shows changes inline like a Git diff; Split places the two versions side by side.
  4. Scroll the result, looking for the green Added and red Removed segments — unchanged lines stay neutral so the eye can skip them.
  5. If the panel reports "The two texts are identical", you know nothing has changed without reading every line.
  6. Edit either panel and the diff updates live; iterate until you have reviewed every change.

Common use cases

  • Reviewing track-changes-style edits a colleague made on a Google Doc when they forgot to leave change history on.
  • Comparing a contract clause before and after legal review to see precisely what wording was negotiated.
  • Spotting subtle differences between two log files or stack traces to figure out why one server is failing.
  • Translators verifying that a localisation only updated language and not the surrounding markup or placeholders.
  • Developers diffing two pasted JSON or YAML snippets without committing them to Git first.

Tips & common mistakes

  • This tool diffs line by line — each newline is a comparison unit. If two long paragraphs differ by one word, the whole paragraph appears as removed and re-added. To get finer granularity, break the input into shorter lines (one sentence per line works well) before diffing.
  • For character-level differences inside a single line, paste only that line on each side and the diff will collapse to the smallest changed segment.
  • Whitespace differences count. Trailing spaces, tab-vs-space mismatches and CRLF-vs-LF line endings will all show up as changes — clean those up first if you only care about content.
  • Split view is friendlier for long diffs; Unified view is more compact and matches the format Git, GitHub and most code review tools use.

Frequently asked questions

How does the diff algorithm work?

We use a longest-common-subsequence (LCS) approach over lines, the same idea behind Unix 'diff'. Each line is compared as a whole.

Can I see word-level differences?

Currently we diff per line. For word-level granularity, paste shorter snippets so each sentence becomes its own line.

Are the original texts uploaded?

No. The whole comparison runs in your browser; nothing is sent anywhere.

Why does a small wording change make a whole paragraph red and green?

Because the diff operates on whole lines. If your two paragraphs are each a single line, any change makes the whole line look replaced. Splitting the paragraph into one sentence per line produces a much more readable diff.

Can I diff three or more versions?

Not in one view. Compare A vs B first, then B vs C in a separate run. For true three-way merging — the kind Git uses to combine branches — a desktop merge tool is more appropriate.

Does the diff work on code with significant indentation, like Python or YAML?

Yes — whitespace at the start of lines is treated like any other character, so an indentation change shows up clearly. That is exactly what you want when reviewing code where indentation has semantic meaning.

Related tools