Skip to main content
QUIETLYTIC
Developer

Git Diff Viewer

Render git diff output as a readable, colour-coded diff.

Local · nothing leaves this browser Waiting for a diff
Esc Clear
Rendered diff

Paste diff output on the left.

How it works

Raw `git diff` output is readable on a wide enough terminal with syntax highlighting; pasted into an issue, a Slack message, or a code review comment box it is just monospace text with plus and minus signs. This parses the unified diff format directly — file headers, hunk headers, and every added, removed and context line — and renders it with the same colour-plus-marker treatment this site's other diff tools use.

A hunk's own line counts decide where it ends

Each @@ -a,b +c,d @@ header declares exactly how many old-side and new-side lines the hunk contains, and this parser trusts that count rather than reading until the next blank line or header — the difference matters on a diff whose last hunk ends at the very end of the pasted text.

New files, deletions and renames are called out

A `new file mode` or `deleted file mode` line in the header, and an `a/old-name` that differs from `b/new-name`, are surfaced per file rather than left for you to notice in the raw header text.

Example

Multiple files in one paste — the output of a multi-file git diff — render as separate sections, each with its own hunks, in the order git printed them.

Frequently asked questions

How does it know where a hunk ends?

From the hunk's own @@ -a,b +c,d @@ header, which declares exactly how many old-side and new-side lines follow — this parser trusts that declared count rather than reading until the next blank line or file header, which matters on a diff whose final hunk runs to the very end of the pasted text.

Does it show new files and deletions differently?

Yes — a new file mode or deleted file mode line in git's own header is surfaced as a label on that file's section, and a rename (where the a/ and b/ paths differ) is shown as old → new rather than as an edit to a file with two different names.

Related tools

From the intelligence desk