T
DataToolings

Free Online Diff to Patch File Converter

Convert unified diff text to a downloadable .patch file online. Paste your git diff output and download a ready-to-apply patch file. Free, instant, browser-based.

What is Diff to Patch?

Diff to Patch is a free online tool that converts unified diff output into a downloadable .patch file. Paste the output from git diff or diff -u and download a ready-to-apply patch file in one click.

How to Use Diff to Patch

  1. Run git diff or diff -u old.txt new.txt in your terminal
  2. Copy the output and paste it into the input area
  3. Click "Download .patch" to save the file
  4. Apply it with git apply changes.patch or patch -p1 < changes.patch

Features

  • Validates unified diff format before download
  • Supports git diff, diff -u, and any unified diff output
  • One-click download as .patch file
  • 100% browser-based — no server upload required

FAQ

What is a .patch file?

A .patch file contains a unified diff that describes changes between two versions of a file. It can be applied to a codebase using git apply or the patch command to reproduce those changes.

How do I apply a patch file?

Use git apply changes.patch inside a git repository, or patch -p1 < changes.patch for non-git projects.

What diff format is supported?

The tool supports unified diff format, which is the output of git diff, diff -u, and most modern diff tools.