Skip to content
100% local

Unified diff analyzer

Summarize a unified diff or .patch file: files changed, lines added and removed.

Input
Output

Unified diff analyzer

Paste a unified diff — the output of `diff -u`, `git diff`, or the contents of a `.patch` file — and this tool builds a per-file overview: how many lines were added and removed in each file, and the totals across the whole diff. It is built for skimming a large patch before opening it in a full code review tool, or for pasting a diffstat-style summary into a pull request description or a changelog.

Sort the file list by path or by number of changes to see the busiest files first. Turn on "Show individual hunks" to break each file down into its `@@` change blocks instead of just a file-level total. "Detect renames and mode changes" recognizes git's rename and file-mode headers and labels those files instead of just listing their new path. "Ignore whitespace-only changes" discounts a removed/added line pair that differs only in spacing — useful after a formatter or linter touched a file. Filter by extension to focus on, say, only `.ts` files in a mixed frontend/backend patch, and exclude generated output such as `dist/*` or `*.min.js` so build artifacts don't pad the summary.

The output format switches between a plain-text table, a Markdown table ready to paste into a pull request description, and CSV for spreadsheets. "Show addition/removal ratio" adds a column with the added-to-removed ratio per file, which is a quick way to spot files that are mostly new code versus mostly deletions. Binary file changes are recognized and reported with zero line counts rather than being skipped or miscounted.

Everything runs locally in your browser — the diff never leaves your device, which matters when it comes from a private repository. Copy the summary, download it as a .txt file, or send it straight to another tool's input to keep working.

FAQ

What diff formats does it accept?
Unified diff output from `diff -u`, `git diff`, `git format-patch` and standard `.patch` files, with or without the `diff --git` header line.
How does it count added and removed lines?
It counts every `+` and `-` line inside each hunk. With "Ignore whitespace-only changes" on, a removed/added pair that is identical once whitespace is stripped is not counted on either side.
Can it show renamed or mode-changed files?
Yes. With "Detect renames and mode changes" on, files that git marked with `rename from`/`rename to` or `old mode`/`new mode` headers are labeled accordingly, showing the old and new path for a rename.
Does it handle diffs with no `diff --git` header?
Yes. Plain `diff -u old new` output, which only has `---`/`+++`/`@@` lines and no git-specific headers, is parsed the same way.
Is my diff uploaded anywhere?
No. The analysis runs entirely in your browser — the diff, and any code it contains, never leaves your device.