Diff Checker

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

How it works

Paste the original text in the left panel and the modified text in the right panel, then click Compare. The tool runs Myers' diff algorithm (via the diff package) on the two inputs and displays the result as a colour-coded line diff — green lines with a + prefix are additions, red lines with a - prefix are removals, and unchanged lines are shown in neutral colour. Click Copy diff to copy the result as a standard unified diff format. Nothing is sent to any server.

Frequently asked questions

What algorithm does the diff checker use?

The tool uses the diff npm package which implements Myers' diff algorithm — the same algorithm used by Git. It finds the minimal set of added and removed lines needed to transform one text into the other.

What does a unified diff format look like?

A unified diff prefixes each line with + (added), - (removed), or a space (unchanged). It is the format produced by "git diff" and "diff -u" and can be applied with the "patch" command.

Can I compare code files?

Yes. Paste the contents of any two text-based files — source code, config files, JSON, Markdown, or plain text — and click Compare to see the line-by-line differences.

Is there a size limit?

No hard limit — the tool runs the diff algorithm entirely in your browser. Very large texts may be slightly slower as the algorithm's complexity grows with input size, but typical code files compare instantly.