Skip to main content

Diff Patch Generator

Compare two texts and generate a standard unified-diff patch (the format git, patch, and code review tools understand). Configurable context lines and custom filenames for the @@ headers.

Features

Frequently Asked Questions

Is the output compatible with git apply?
Yes. The patch uses standard unified-diff format with --- / +++ headers and @@ hunk markers - pipe it to git apply or patch -p0.
Can I change the context size?
Yes. Pick any number of context lines (the default of 3 matches git's default).
What about binary or very large files?
The tool is text-only. For very large inputs the diff still runs in your browser but may be slow - consider using git for multi-megabyte files.