All processing happens locally in your browser — nothing is sent to any server
Text A
Text B

Text Diff is a free online tool for comparing two texts with line-level and word-level precision. Side-by-side or inline view with highlighted changes. Runs entirely in your browser — no data is sent to any server.

What is a diff?

A diff is a structured comparison between two pieces of text that highlights what was added, what was removed, and what stayed the same. Developers use it every day to review code changes, audit configuration drift, and compare JSON or CSV files.

This tool runs the comparison entirely in your browser using the jsdiff library. Nothing you paste or upload is sent to any server.

How to use

Paste or drop your two inputs into the Original and Modified fields. The diff computes automatically for inputs under 512KB; for larger inputs a Compare button appears so you stay in control.

Toggle between side-by-side and inline views, ignore whitespace or case when needed, and use Format JSON to normalize JSON inputs before comparing.

Algorithm

Built on the Myers diff algorithm via jsdiff. The tool first computes a line-level diff, then for each pair of adjacent removed-and-added lines runs a second word-level pass to highlight which words actually changed — the same convention used by GitHub pull requests.

Common Use Cases

Comparing two configuration files (JSON, YAML, .env) to spot drift between environments.

Reviewing a code change before pasting it into a commit, especially when working outside an editor.

Reconciling two versions of a document, log, or query result side by side.

Limitations

The tool diffs text only. Binary files are detected and rejected to keep the result meaningful.

Inputs are capped at 5MB per side. Inputs above 512KB run in a background Web Worker; the page stays responsive but the diff itself takes proportionally longer for very large inputs.

Differences in line endings (CRLF vs LF) and trailing whitespace are normalized away — they will never appear as changes.

Is there a file size limit?

Diff computation runs entirely in your browser using a Web Worker. Inputs up to 5MB per side are accepted; texts up to a few MB diff smoothly. Performance depends on your device.

Related Tools