{ Text Diff }

// compare two texts β†’ see exactly what changed

Compare two paragraphs and see exactly what changed. Line-by-line and word-level diff with colour highlights. Browser-based, free, no sign-up required.

VIEW
DIFF BY
A β€” ORIGINAL 0 lines
B β€” MODIFIED 0 lines

HOW TO USE

  1. 01
    Paste Two Texts

    Add the original text in panel A and the modified version in panel B.

  2. 02
    Choose View & Granularity

    Select Split, Unified, or Inline view. Diff by Line, Word, or individual Character.

  3. 03
    Compare & Copy

    Click Compare or press Ctrl+Enter. Copy the diff or download it as a .diff file.

FEATURES

Line diff Word diff Char diff Split view Unified view Inline view Ignore case Ignore whitespace

USE CASES

  • πŸ“ Proofread document revisions
  • πŸ’» Compare code snippets quickly
  • πŸ“‹ Track contract or policy changes
  • 🌐 Verify translated content edits

WHAT IS THIS?

Text Diff compares two versions of any text and highlights every addition, deletion, and unchanged line β€” exactly like the diff command in a terminal, but with a visual, colour-coded interface. No uploads, no sign-in, nothing leaves your browser.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What do the colours mean?

Green highlights indicate lines or words that were added in the modified text. Red highlights show content that was removed from the original. Grey or uncoloured lines are unchanged.

What is the difference between Line, Word, and Char diff?

Line diff compares entire lines and is best for code or structured text. Word diff highlights individual word changes within a line β€” ideal for prose. Char diff shows character-level differences for precise editing comparison.

What does "Ignore whitespace" do?

When enabled, differences caused only by extra spaces, tabs, or line breaks are ignored. Two lines that differ only in indentation or trailing spaces will be treated as identical.

Is my text sent to a server?

No. The entire diff algorithm runs in your browser using JavaScript. Your text never leaves your device. This makes it safe for sensitive documents, private code, and confidential content.

What is the Unified view?

Unified view shows both texts merged into a single stream β€” additions are prefixed with + and deletions with -, just like the output of the Unix diff command or a Git patch file.

Can I compare code?

Yes β€” Text Diff works with any plain text, including source code, JSON, HTML, SQL, and config files. For best results with code, use Line diff and enable Ignore whitespace to avoid noise from indentation differences.

Text Diff β€” Online Text Comparison Tool

Text Diff is a free, browser-based tool that compares two pieces of text and highlights every change between them. Whether you are proofreading a document revision, reviewing a code change, comparing contract versions, or verifying a translation, Text Diff shows you exactly what was added, removed, and left unchanged β€” instantly, without any server upload.

How the Diff Algorithm Works

Text Diff uses the Longest Common Subsequence (LCS) algorithm β€” the same technique behind the Unix diff command and Git's change tracking. It finds the longest sequence of tokens (lines, words, or characters) that appear in both texts in the same order, then marks everything outside that sequence as either an addition or a deletion.

Three View Modes

Split view places both texts side by side with matching lines aligned β€” the easiest way to scan changes visually. Unified view merges both into a single column with + and - prefixes, matching the format of a standard .diff or .patch file. Inline view shows the modified text with additions and deletions overlaid directly in the flow of the text β€” useful when you want to read the new version while still seeing what was removed.

Granularity Options

Choosing the right granularity makes a big difference in readability. Line-level diff is best for code and structured documents where each line is a meaningful unit. Word-level diff is ideal for prose β€” it pinpoints exactly which word was changed in a long paragraph. Character-level diff is the most detailed option, useful for catching a single transposed letter or a subtle punctuation change.

β˜•