Standard unified diff

Diff & Patch Generator

Paste two versions of a text and get a ready-to-use unified diff patch block — compared locally in your browser.

Unified diff

How it works

1

Paste both versions

Drop in the original and the modified text side by side.

2

Click Generate diff

Lines are compared with an LCS-based algorithm, the same idea used by "diff".

3

Copy the patch

Get a standard unified diff, ready to save as a .patch file.

FAQ

What format is the output?

A standard unified diff, the same format produced by "diff -u" or "git diff", with --- and +++ file headers and an @@ hunk header.

Can I apply this patch with git or patch?

Yes. The output is valid unified diff syntax and can be saved as a .patch file and applied with "git apply" or the "patch" command.

Is my text uploaded anywhere?

No. The comparison runs locally in your browser using a line-based diff algorithm; nothing is sent to a server.

Try other tools