Unified Patch Inspector

Inspect unified patch files and preview exact-context application to supplied source without running commands.

Inputs stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Inspect patch controls

Showing an example. Edit to see your own.

Ordinary unified hunks only. Up to 2,000 lines, 50 files and 200 hunks. Combined and binary patches are refused.

Preview checks every old/context line at its exact line number. Up to 10,000 lines and 100,000 characters.

For a multi-file patch, enter the exact old or new path (up to 240 characters). Leave both this and Source text blank to inspect without previewing.

Processed in your browser. Your inputs stay on this device.

How to use Unified Patch Inspector

  1. Paste an ordinary unified patch with its file headers and hunks.
  2. Inspect the named files, added lines, removed lines and any format errors.
  3. To preview a change, supply the matching source and select the intended file when required.
  4. Review conflicts or copy the preview; the page does not write files or run the patch.

Example: Unified Patch Inspector

Preview a three-line change with exact context.

You add
Patch for greet.txt: hunk @@ -1,3 +1,3 @@ with context Hello and Bye, removing Old line and adding New line. Source: Hello, Old line and Bye on separate lines with a final line break. Preview path: greet.txt.
You get
The report counts one added and one removed line. The preview is Hello, New line and Bye on separate lines, retaining the final line break.

Supported inputs and limits

Up to 100,000 patch characters, 2,000 patch lines, 50 files and 200 hunks; supplied source is limited to 100,000 characters and 10,000 lines. Only ordinary unified file headers and hunks are supported. Preview requires the intended path when several files are present and exact source context and line-ending information. Malformed counts, combined or binary diffs are refused. No fuzzy matching, commands, filesystem writes or code execution occur.

Where your input is processed

This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

A hunk describes both versions

Hunk headers declare old and new ranges. Context lines occur in both versions, minus lines belong to the old source and plus lines belong to the new source. Counts must agree with those lines before an exact-context preview can be trusted.

Questions about Unified Patch Inspector

Does this run git apply or patch?

No. The page reads the supplied text and compares hunk context locally. It does not launch a command or change your project files.

Why does a valid-looking hunk conflict?

The supplied source may differ from the patch's expected lines or final line ending. Exact-context preview deliberately avoids guessing a new position for unmatched text.

Can it inspect binary or combined diffs?

Those forms are outside the stated ordinary unified-patch support. A refusal means this preview cannot interpret the patch; it is not a verdict on whether another patch engine could use it.

What should I check before using a preview?

Confirm the intended path, original source and every changed line. A matching hunk does not establish that the code change is correct or safe to execute.

Project manager: Tony Hines · Content updated 1 October 2026 · Report a problem