How to use
Paste your diff, choose an output style, then format and copy.
- Paste a unified diff/patch into Input.
- Select Style (Pretty, Compact, or Changes only).
- Optional: strip ANSI colors, trim trailing whitespace, or strip commit headers.
- Click Format and copy the output.
FAQ
Does this tool upload my diff to a server?
No. Formatting runs locally in your browser and the tool does not send network requests.
What is “Compact” mode?
Compact mode removes common noisy metadata like index, file modes, and rename/copy lines while keeping headers and hunks.
What is “Changes only” mode?
It keeps file headers and hunk headers but drops context lines (those starting with a single space) inside hunks.
Why strip ANSI colors?
Diffs copied from terminals may include escape codes that break pasting into issue trackers; stripping them makes the text plain.
Will this change the meaning of my patch?
Pretty mode is safe for sharing and normalizes whitespace/line endings only; Compact/Changes-only remove lines for readability, not for re-applying as a patch.
Can I format a patch from git show?
Yes. If your paste includes commit metadata, enable “Strip commit header” to keep only the diff portion.
My output looks empty—what happened?
If you used “Changes only” and your diff has no hunks or only context lines, most lines may be removed; switch back to Pretty to confirm.