Text Diff Online — Side-by-Side Line Diff

Compare two free-text blobs side by side with line-level highlighting. Optional ignore leading/trailing whitespace per line. Complements JSON Diff — everything stays local (documented size caps).

Loading…
Text diff — developer notes
Line-level diff via the npm diff library, rendered strictly side-by-side. Caps at 100,000 characters / 5,000 lines per pane.

How comparison works

Paste left and right, optionally ignore leading/trailing whitespace per line (diffLines semantics), then Compare. Copy a unified +/- diff.

Options

Ignore leading/trailing whitespace
Passes ignoreWhitespace to diffLines: lines that differ only by edge whitespace are treated as equal.

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

Why not unified-only view?

The accepted layout is side-by-side. A unified +/- copy remains available for the clipboard.

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.

Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.