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.

Developer utilities

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

Explore other tool categories

Minify

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.

Beautify

Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.

Unminify

Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.

Conversion

Transform data between JSON, YAML, XML and CSV locally — no server uploads.

CSS preprocessors

Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.

JSON Tools

Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.

SVG Tools

Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.

DevOps & Infra

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.

CI/CD

GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.

Logs & observability

Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.

Kubernetes

Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.

Networking / IP

CIDR, subnets, and IPv4/IPv6 helpers — in your browser.

Security & tokens

JWKS, X.509 certificates, and secrets scan — browser-local.

API & schemas

OpenAPI tools to format, validate, and lint your specs.

Encoding

Encode or decode Base64, URL components and HTML entities — client-side only.

Text & Markdown

Count words, build Markdown TOCs, and clean line lists — all in your browser.

AI & LLM

Token counting, pricing estimates, and context-window fit — 100% browser-local.

Serialization

Serialize and deserialize PHP data structures beside JSON workflows.