Patch Viewer
Free unified diff / patch viewer. Paste a patch and view it with colorized additions and removals, per file and hunk.
Reading a hunk header
A line like `@@ -12,7 +12,9 @@` is telling you exactly where a chunk of changes lands in both versions of the file: starting at line 12 of the original, spanning 7 lines, and starting at line 12 of the new version, spanning 9 lines — the count went up because this hunk adds more lines than it removes. Everything below that header until the next `@@` or file boundary is one contiguous chunk of context, removed, and added lines, shown together specifically so the change reads in its natural surrounding context rather than as an isolated line, which is why unified diff format won and largely replaced older context-diff and normal-diff formats.
A viewer, deliberately not an applier
Actually applying a patch (`git apply`, `patch -p1`) requires the exact target file to already match what the patch expects at each context line, handles fuzzy-matching when lines have shifted, and can partially fail in ways that need careful review. This tool sidesteps all of that by only rendering — it reads the diff's structure and colors additions/removals for review, without touching a filesystem or attempting to reconcile the patch against a real file. That makes it useful for the very common case of "someone pasted a diff into a chat or ticket and I want to read it clearly," which doesn't require any of the machinery an actual patch applier needs.