Unified Diff / Patch Generator
Compare an original and revised text to generate a standard unified diff, the same format produced by `diff -u` and git.
Frequently asked questions
What's a unified diff actually used for?+
It's a plain-text, machine-readable format for describing changes between two files, the same format git uses for commits and the format tools like `patch` can apply automatically to turn one file into another.
How is this different from the visual Text Diff Checker?+
The Text Diff Checker shows a visual, color-coded comparison meant for a person to read. This generates the actual unified diff file format, meant to be saved, shared, or applied by a tool like git or patch.
What do the @@ lines in the output mean?+
Hunk headers, they mark the starting line number and line count for the affected section in both the original and revised file, so a patch tool knows exactly where to apply the change.