Text Diff Online — Side-by-Side Line Diff

Compare two free-text blobs with line- and word-level highlighting, side by side (default) or unified. Optionally ignore whitespace and/or letter-case differences. Complements JSON Diff — everything stays local (documented size caps).

Loading…
Text diff — developer notes
Line-level diff via a custom comparator over the npm diff library (diffArrays + diffWordsWithSpace for word-level highlighting), rendered side-by-side or unified. Caps at 100,000 characters / 5,000 lines per pane.

How comparison works

Paste left and right, optionally ignore whitespace differences and/or letter case, then Compare. Changed lines get word-level highlighting; switch between Split and Unified layout at any time. Copy or download the unified +/- diff.

Options

Ignore whitespace
Passes a whitespace-aware comparator to the diff engine: lines differing only by leading/trailing spaces or by extra internal spaces/tabs are treated as equal.
Ignore case
Compares lines case-insensitively — lines differing only by letter case are treated as equal. The original casing is still shown in the result.

Examples

Changed line

Left

a b

Right

a c

Append line

Left

one two

Right

one two three

Related tools

For structural JSON, use JSON Diff. Back to the utilities hub.

Text diff FAQ

Free-text comparison

Split or Unified — which is the default?

Split (side-by-side) is the default and most detailed view. Toggle to Unified for a single-column, git-diff-style layout — both share the same word-level highlighting on changed lines.

Size limits?

100,000 characters or 5,000 lines per pane — beyond that you get a too_large error.

3-way merge / apply patch?

Out of scope for v1.

JSON Diff vs text?

JSON Diff compares JSON structure. This tool is free-text line-by-line.

Windows CRLF vs Unix LF?

Line endings are normalized to LF before comparison — pasting Windows text against Unix text will not create false positives from \r alone.

Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.