Text Diff

Compare two texts and see the differences highlighted. Works with lines, words, or characters.

Spot the difference

Original Text
Modified Text
Diff Result

Enter text in both panels to see the diff

About This Tool

Text Diff compares two texts and highlights the differences. It uses an LCS-based algorithm to find the longest common subsequence and show what was added, removed, or unchanged. Choose line mode for code, word mode for prose, or character mode for detailed comparisons.

About

About the Text Diff

Text Diff compares two blocks of text and highlights exactly what changed between them — additions, deletions, and edits — so you can spot the difference at a glance instead of reading both versions line by line. Reach for it when you need to confirm what's different between two drafts, two config snippets, two API responses, or two versions of any text. It runs entirely in your browser, so nothing you paste is uploaded or stored.

How to use the Text Diff

  1. 1Paste your original (or "before") text into the first input.
  2. 2Paste the text you want to compare it against into the second input.
  3. 3Review the highlighted output, where added and removed parts are visually marked.
  4. 4Edit either side and re-check to confirm the two versions now match or differ as expected.
  5. 5Copy the corrected text back into your editor when you're done.

Common use cases

  • Confirm what changed between two drafts of an article, email, or document
  • Compare two versions of a config file, environment file, or code snippet before committing
  • Check whether two API responses or JSON payloads differ and where
  • Spot edits in revised contract, policy, or terms-of-service text
  • Verify that a copy-paste or migration didn't silently alter a block of text

Frequently asked questions

What is a text diff?

A text diff compares two pieces of text and shows what changed between them — which parts were added, removed, or modified. It's the same idea behind the "diffs" developers see in version control and code review, applied to any plain text.

Is my data private?

Yes. The comparison runs entirely in your browser using client-side code. Neither block of text is uploaded to a server, saved, or tracked, so you can safely compare sensitive content like config files or internal documents.

Is it free to use?

Yes, it's completely free with no sign-up required. Paste your two texts and compare as many times as you like.

What kind of text can I compare?

Any plain text works — prose, code snippets, JSON, CSV rows, log lines, configuration, email drafts, or terms-of-service revisions. Paste both versions and the tool highlights where they diverge.

How does it find the differences?

It aligns the two texts and marks the segments that don't match, so insertions and deletions stand out from the parts that stayed the same. You read the highlights instead of comparing every character by eye.