Skip to content
nah

Text Diff Checker

Paste two texts and see exactly what changed — line by line, instantly.

100% in your browser — files never leave your device

Paste text in both fields to see the diff.

How the line diff is computed

This is a classic longest-common-subsequence diff: it finds the longest run of lines that appear in the same relative order in both inputs, then marks everything else as added or removed. That's the same underlying approach line-oriented diff tools use, applied line by line rather than word by word.

LCS is expensive in memory — a diff table with one cell per pair of lines. Two 2,000-line files already means 4 million cells, which starts to strain a browser tab. Past roughly 2 million cells the tool stops and reports the inputs as too large rather than freezing the page; split very large files before diffing them here.

Because comparison happens at the line level, a single changed character turns the whole line into a remove-then-add pair rather than an inline highlight. That's a real limitation for prose written as long paragraphs on one line — reformat to one sentence per line first if you want a more granular diff.

Frequently asked questions

Is my text sent to a server?

No. The diff runs entirely in your browser using a longest-common-subsequence algorithm. Nothing you paste is uploaded anywhere.

What does "Ignore whitespace" do?

When enabled, leading/trailing whitespace is trimmed and runs of whitespace are collapsed to a single space before comparison. Lines that differ only in whitespace will be treated as equal.

How does the line number display work?

Left numbers track lines in the original text; right numbers track lines in the changed text. Removed lines show only a left number; added lines show only a right number; equal lines show both.

Related tools