A ↔ B

Text diff

Compare two texts line by line, see exactly what was added or removed with both line numbers, and copy the result as a unified diff.

Lines: 0

Lines: 0

Both texts are compared in this tab. Nothing is uploaded, so internal configuration and customer data can be compared without exporting it anywhere.

Short answer: paste the old text on the left and the new text on the right. Removed lines appear in red, added lines in green, and everything else is unchanged. Use Copy to take away a unified diff you can attach to a review.

Line diff, not a character cloud

Word-level and character-level diffs look impressive in a screenshot and are hard to read in practice: a single renamed variable scatters marks across every line that mentions it. When you are reviewing code, configuration, CSV exports or SQL, the question is almost always "which lines changed". That is what this view answers, with the line number on both sides so you can jump straight to the file.

Exact, including whitespace

Trailing spaces, tabs, line endings and case all count. Two files that look identical on screen can differ by an invisible character, and that difference is exactly what breaks a checksum or a snapshot test. The tool shows it rather than hiding it behind an "ignore whitespace" switch that would make the result wrong for those cases.

Reading the result

Comparing JSON instead of plain text? Format both sides with theJSON formatter first — one property per line makes the diff readable — then paste the results here. To verify a file against a published digest, use thehash generator.

Text diff questions

How does the comparison work?

It is a line diff over a longest-common-subsequence table, so unchanged lines stay aligned and only real differences are marked. Common leading and trailing lines are trimmed first, which keeps large files fast. The result is the same shape as a unified diff: one line per addition or deletion, with both line numbers.

Does it ignore whitespace or case?

No, and that is deliberate. A diff that hides a trailing space or a case change will show "no differences" for a file that a compiler, a checksum or a test will treat as different. What you see here is exactly what changed, character for character.

Can I compare two files?

Yes — each side has its own file picker. Text files up to 200,000 characters per side are read locally. A binary file such as an image will produce nonsense, because the diff works on text lines.

What is a unified diff?

The format produced by diff -u and accepted by git apply and patch: a header with both file names, then context lines prefixed with a space, additions with + and deletions with -. The Copy and Download actions give you that text, so a small change can be attached to a review or a ticket.

Why does a huge comparison say it was not aligned exactly?

The exact table needs memory proportional to (lines left × lines right). Beyond about a million cells the middle block is reported as replaced instead of hanging the tab, and the summary says so. Trimming the common prefix and suffix usually avoids that path entirely.

Related tools