Online Text Diff & Comparison Tool

Find differences between two versions of text with visual color-coded additions, deletions, and inline modifications.

Runs locally 0 lines • 0 bytes
Results update as you type
Original (left)
Modified (right)
Differences
Awaiting comparison
// Diff results will appear here...
About this tool

About the Text Diff

Compare two text files or snippets side-by-side. Highlight additions, deletions, and inline word changes with fast in-browser diffing.

How to use the Text Diff

  1. Paste the original text on the left.
  2. Paste the changed version on the right.
  3. Review the colour-coded result: added lines, removed lines and unchanged lines.

Text Diff example

Input
Original:
Price: $20
Shipping: free

Modified:
Price: $25
Shipping: free
Tax included
Result
− Price: $20
+ Price: $25
  Shipping: free
+ Tax included

When to use it

  • Comparing two versions of a contract, policy or essay.
  • Checking what changed in a config file before you deploy it.
  • Proofreading an edited article against the draft.

Tip: The comparison runs line by line, so keep each sentence or setting on its own line for the clearest result.

Visual Change Highlighting

Color-coded diff clearly marks removed lines (red) and added lines (green), with inline word highlights inside modified lines.

Word & Line Comparison

A git-style line diff with word-level highlights inside changed lines; optionally ignore whitespace or case.

One-Click Swap & Clear

Swap left and right inputs easily to reverse comparison perspective.

Private & Secure

Compare confidential contracts, legal drafts, and proprietary code without exposing them to remote servers.

FAQ

Common questions

How does text diffing work?

It calculates the Longest Common Subsequence (LCS) between the original and modified documents to determine exact insertions and deletions.

What do the diff colors indicate?

Green highlights added lines and text, red marks removed lines and text, and modified lines are paired with inline word-level highlights.

Can I compare code snippets or prose?

Yes! Text Diff works seamlessly on plain text, Markdown, code snippets, CSV files, and config files.

Is there any character limit for diffing?

No, comparison runs in your local browser memory and can comfortably diff long essays, documentation pages, or log files.