Code Beautifier

Unified Patch

Generate git-style unified diffs, structured patch JSON, or apply a patch to original text — fully offline. · Updated

Options
Mode:
Context lines:
text
Unified patchdiff
Draft saved locally.

Options

OptionDescription
ModeCreate a patch from two sides, export structured hunk JSON, or apply a unified patch under === PATCH ===.
Context linesNumber of unchanged context lines around each hunk (unified/structured modes).

FAQ

How do I format input for creating a patch?

Separate original and modified text with === MODIFIED ===, or pass JSON with original and modified fields.

How does apply mode work?

Put the base file above === PATCH === and a unified diff below it. The tool attempts a clean apply locally.

Is this the same as Diff Checker?

Diff Checker focuses on visual comparison. This tool emits and applies standard unified patches.

Does any code leave my machine?

No. Patch creation and application run entirely client-side.

Can I name the file in the patch header?

Yes. Add === FILE: path/to/file === above the original side, or include fileName in JSON input.