Text Diff

Compare two versions of any text or code and see exactly which lines were added, removed, or changed. Everything runs in your browser.

At a glance

When a quick diff saves the day

Everything happens locally — the comparison runs in JavaScript with no server round-trip, so it is fine for internal configs, credentials you would never paste into a web service, or anything confidential.

Frequently asked questions

What kind of diff is this?

A line-by-line diff computed with a longest-common-subsequence algorithm, the same approach behind classic diff. Lines that exist on one side only are marked as added or removed; a removed line followed by an added one is treated as a single changed line and paired up, so you see it once instead of twice.

Why does it highlight words inside a line?

When a line is marked as changed, the words inside it are diffed separately, so you can see which part of the line moved. Turning the option off shows the whole line as removed and added instead. Word highlighting is skipped on very long lines to keep the page responsive.

How much text can it handle?

Comfortably a few thousand lines per side. The comparison table is capped: past that the tool falls back to a simpler comparison, trims the shared beginning and end of both texts, and marks the rest as changed. You will be told when that happens instead of waiting for the tab to freeze.

Can I use it for config files and code?

Yes. It is the everyday use case: compare two versions of a config file, a log excerpt, a JSON response, or a function before and after a refactor. Line endings in CRLF, CR and LF files are normalised first, so a Windows file compared against a Unix one will not show every line as changed.

Is my text uploaded anywhere?

No. Both texts stay in your browser and the comparison is done in JavaScript. There is no server component, and nothing to upload to. You can disconnect from the network after the page loads and it will still work.

What do the colours in the result mean?

Green lines are additions that exist only on the right side, red lines are removals that exist only on the left, and a red line paired with a green line is a changed line shown as one unit. The two line-number columns show each side's numbering, so you can jump back to the original files.

Can I compare two files?

Yes — open both files, copy each one's contents, and paste them into the left and right panes. The tool compares the text itself, not file metadata, and it normalises CRLF, CR and LF line endings first, so a Windows file and a Unix file compare cleanly.

Is this the same as git diff?

Same family, fewer features. git diff also uses a longest-common-subsequence algorithm (Myers' variant), so the core added/removed/changed output matches. What git adds on top: hunk headers, rename detection, three-way merges and context options. For quickly answering "what changed between these two versions", this tool gives the same answer with zero setup.