LocalFirstTools.com — data tools that never leave your device
No upload — everything runs on your device

Text Diff

Compare two texts line by line and see what changed. Nothing is uploaded.

The Text Diff compares line by line with the diff library's Myers-family algorithm — the same class git uses — and counts added and removed lines, entirely in the browser.

Press Compare to see the line diff

What does the Text Diff do?

A line diff shows what changed between two versions of a text: config files, SQL dumps, API responses, contract clauses. Removed lines are marked with a minus, added lines with a plus, and unchanged lines stay muted so the changes stand out.

How does the Text Diff work?

Both texts are split into lines and compared with the diff library's diffLines function — the same Myers algorithm family used by git. The optional whitespace toggle ignores leading, trailing and internal whitespace differences when deciding whether two lines are equal. Everything runs in this tab.

Does this upload my text?

No. This page never sends your input to a server — formatting, decoding and hashing all run in this tab, on this device.How that works.

Frequently asked questions

Is this the same diff git shows?

It is the same class of algorithm, so results are usually identical for line-level changes. Git adds context headers and rename detection that this tool intentionally leaves out.

Can it diff within a line?

No — this tool works at line granularity. A changed line shows up as one removed line plus one added line rather than a character-level highlight.

What does “Ignore whitespace” do exactly?

Lines that differ only in whitespace — indentation, trailing spaces, tabs versus spaces — are treated as equal. Useful when comparing reformatted code or copy-pasted text.

Is there a size limit?

Only your browser's memory. Diffing is O(ND) in the worst case, so two very large, very different texts can take a moment, but nothing is sent anywhere.

Related tools

Browse alltext toolsor thefull tool directory.