Diff Checker

Paste an original and changed version to see an exact, private line-by-line comparison.

Exact line comparison: line endings are treated alike; all other case, spacing, tabs, and Unicode stay significant.

Maximum 100,000 UTF-8 bytes and 1,000 logical lines per side. One side may be empty.

Private comparison: text and results stay in this tab. They are not added to the URL, history, storage, cookies, requests, analytics, error reports, or console. Analytics receives fixed tool and action identifiers only.

How the exact line comparison works

The calculator treats Windows CRLF, old-style CR, and LF as the same line separator. It does not trim lines, collapse spaces, change case, or normalize Unicode. That means a b differs from a  b, and a composed character can differ from an equivalent combining sequence.

It builds an exact longest-common-subsequence table over at most 1,000 logical lines on each side. Equal lines remain unchanged. Other rows become removals or additions, with deletions shown before additions when more than one shortest edit script is possible. A changed line is therefore one removal plus one addition; this tool does not perform character, word, semantic, or structure-aware comparison.

Worked line-diff example

Compare original lines alpha, beta, and gamma with changed lines alpha, BETA, gamma, and delta. The receipt reports 3 original lines, 4 changed lines, 2 unchanged lines, 1 removed line, and 2 added lines. It lists beta as removed, BETA as added, and delta as added.

Newlines, blank records, and limits

An empty side has zero lines and is valid when the other side contains text. Both sides empty is invalid. For non-empty text, a final newline creates a final blank logical record: a has one line while a\n has two. Blank records appear with a visible Blank line label.

Each side is limited to 100,000 UTF-8 bytes and 1,000 logical lines. The comparison uses O(N × M) time and table space, so those limits cap the table at 1,000,000 cells. For files, structured JSON/XML/YAML/CSV comparison, merges, downloads, or share links, use a tool built for that separate job.

Frequently asked questions

Does this diff checker upload or save my text?

No. Comparison and copying run in this browser tab. This tool does not put text or results in the URL, browser storage, cookies, requests, analytics, error reports, or console.

What counts as a changed line?

The tool finds an exact longest common subsequence of logical lines. A changed line appears as one removed line followed by one added line; it does not guess that two lines are a fuzzy replacement.

Are spaces, case, and Unicode differences significant?

Yes. Spaces, tabs, case, non-breaking spaces, and Unicode sequences compare exactly. The only normalization treats CRLF, lone CR, and LF as the same logical line separator.

Does a final newline count?

Yes. A non-empty value ending in a newline has a final blank logical line. The result labels that record as Blank line so the difference stays visible.

How much text can I compare?

Each side accepts up to 100,000 UTF-8 bytes and 1,000 logical lines. These stated limits keep the exact line comparison bounded and responsive.

Sources and method

Related tools