Text Diff

Compare two texts.

Workspace

Text Diff: what this tool is for

Spotting differences between two drafts of an article, legal contract revisions, code snippets, configuration files, or translated passages is tedious and error-prone when attempted manually. Even a single modified number or misplaced comma can have significant legal or technical consequences.

Xorvian's Text Diff Checker provides instant, side-by-side and inline visual comparison between any two texts. Powered by the industry-standard Myers diff algorithm, the tool highlights additions (in green), deletions (in red), and modified sections with pixel-perfect accuracy.

Switch effortlessly between Word-level, Character-level, and Line-level comparison modes depending on whether you are proofreading editorial prose or auditing technical code. Instant statistics report the exact count of added, deleted, and unchanged characters.

100% private, client-side, and free: comparison runs locally inside your web browser. Confidential contracts, proprietary source code, and private drafts are never transmitted across the internet.

  • No file stored

    Selected files are processed in your browser, without being uploaded to Xorvian.

  • Local processing

    Calculations run locally. The currency converter requests rates from an external service.

  • Processing time

    The time needed depends on the tool, the file and your device's capabilities.

  • Free, no account

    Tools are available without registration. An account lets you synchronize favorites and history.

What this tool gives you

  • Multiple Granular Diff Modes

    Compare texts at the Word level (best for prose and articles), Character level (best for typos and formulas), or Line level (best for code and configs).

  • Side-by-Side & Inline Visual Views

    Toggle between a two-pane side-by-side layout or a unified inline view with clear color-coded highlights for additions (green) and deletions (red).

  • Real-Time Diff Statistics

    View instant metrics showing the exact number of words and characters added, removed, and unchanged between both versions.

  • Granular Line-by-Line & Inline Word-Level Diffs

    Comparison executes in local browser memory. Sensitive NDA contracts, source code, and unpublished drafts never touch remote servers.

  • One-Click Sample & Clear Actions

    Easily swap text panes, load sample comparisons, or clear the workspace with intuitive toolbar buttons.

  • Side-by-Side Comparison with Red/Green Highlighting

    High-performance diff engine compares lengthy documents containing thousands of lines in milliseconds.

Real-world examples

Recommended diff comparison modes across practical editorial and technical tasks:

Diff Comparison Modes, Highlighting Resolution & Recommended Applications
Comparison ModeHighlight ResolutionVisual FocusBest Practical Use Case
Word Diff (Default)Word-by-wordHighlights whole modified wordsProofreading blog articles, essays, and marketing copy
Character DiffCharacter-by-characterHighlights individual letters and punctuationSpotting minor typos, single-digit price changes, formula edits
Line DiffLine-by-lineHighlights entire altered linesComparing source code, JSON configs, CSS sheets, SQL scripts

How to use Text Diff

  1. Paste Original and Modified Texts

    Paste your original source version into the left/top editor and your revised version into the right/bottom editor.

  2. Select Your Diff Mode

    Choose between 'Words' (prose), 'Characters' (typos), or 'Lines' (code) depending on your comparison needs.

  3. Choose Visual Layout

    Switch between 'Split View' (side-by-side columns) or 'Unified View' (inline merged stream).

  4. Inspect Differences & Copy

    Review color-coded additions (green) and deletions (red), and copy the diff summary as needed.

Tips and mistakes to avoid

Auditing Legal Contract Amendments

Paste the original contract and the counterparty's revised draft to immediately spot stealthy clause modifications or altered figures.

Use Character Diff for Number Verification

Character-level diffing is ideal for financial reports and invoices where only specific digits or punctuation marks were adjusted.

Compare JSON Configuration Changes

Format your JSON files using our JSON Formatter first, then run them through Text Diff in Line mode for a clean structural comparison.

Avoid : Using Line Diff on Single-Paragraph Prose

If an entire paragraph is on one continuous line, Line mode will highlight the whole paragraph as changed; switch to Word mode instead.

Avoid : Ignoring Whitespace Differences

Ensure leading spaces and tab indentations are consistent if comparing whitespace-sensitive formats like Python or YAML.

Avoid : Reversing Original and Modified Panes

Ensure the original baseline text is in the left/first box so additions and deletions are color-coded correctly.

Frequently asked questions

Answers to the questions people ask about Text Diff.

We use an optimized implementation of the Myers difference algorithm to compute the minimal sequence of insertions and deletions needed to transform text A into text B.

Green highlighting represents text that was added in the revised version. Red highlighting (with strikethrough) represents text that was deleted from the original.

Split view displays original and modified versions in side-by-side panes. Unified view merges both versions into a single continuous stream with inline additions and deletions.

No. The entire comparison algorithm runs locally inside your browser memory. Your documents remain 100% private.

Yes. Use the 'Lines' mode for clean code diffing similar to Git pull requests.

There is no fixed limit. The tool easily compares documents containing tens of thousands of words in a few milliseconds.

Yes. The diff engine flags letter casing changes, indentations, and trailing whitespace adjustments, making it ideal for code and contract review.

Yes. It is 100% free with no registration, subscriptions, or daily limits.

Yes. Click the 'Swap' button in the toolbar to instantly invert the comparison direction.

Standard diff algorithms detect moved text as a deletion from the original position and an insertion at the new position.

Related tools

Tools people open right after this one.

Updated on August 2026. See all tools