Apply unified diffs or copy-patch output to an original document
The quick brown fox leaps over the sleepy cat. Line 3.
context, + added, − removeddiff -u): context, +added, -removed. @@ hunk headers and ---/+++ file headers are ignored — all hunks apply top-to-bottom on the provided original.A patch is a tiny description of the changes between two versions of a file. Applying one reconstructs the 'after' version from the 'before' version plus the diff. It's how git, code review tools, and operating system package managers ship updates. This tool applies patches in the browser with conflict visibility — useful for testing a patch before git-apply, or just understanding what a patch does.
No — use git apply for production patches with binary files, renames, etc. This is for the 90% case: a single text file + a patch, done in the browser without a terminal.
When the patch expects context line X but your original has Y at that position, the patch still applies but the mismatch is flagged so you can review. Matches git apply --reject behavior.
No — this is text-only. Binary patching requires git.
They're ignored — we apply hunks sequentially to the provided original. For correct behavior, either supply a single-hunk patch or make sure the original starts at the first hunk's context.
Swap the + and − prefixes in your patch text before applying. True reverse-apply is on the roadmap.