We use cookies to understand how the site is used and to display ads. Analytics and advertising only run after you accept. You can change your choice anytime via the footer link or your browser settings. Privacy policy

Skip to content
>_devvkit

dev

Git Diff Viewer

Paste a git diff and read it visually: hunks, line numbers, additions, deletions.

2 files changed 8 3

@@ -12,7 +12,8 @@ export function formatBytes(bytes: number): string {

1212 if (bytes >= 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`
1313 if (bytes >= 1024) return `${(bytes / 1024).toFixed(1)} KB`
14 - return `${bytes} B`
14+ return `${bytes} B`
1515 }
16+
17+export function formatCompact(n: number): string {
18+ if (n >= 1e6) return `${(n / 1e6).toFixed(1)}M`
19+ return String(n)
20+}
//Share this tool

Turn raw git diff output into a readable visual diff: file list, hunks, line numbers, and color-coded additions and deletions. Paste a diff or drop in a .diff/.patch file — everything stays in your browser.

[x]Features
  • -Parses unified diff (git diff) output
  • -Per-file change summary with +/− counts
  • -Hunk headers with old/new line numbers
  • -New, deleted, and renamed file detection
  • -File upload (.diff/.patch) and copy-to-clipboard
>Use Cases
  • >Reviewing a pull request diff locally
  • >Reading patch files without opening a terminal
  • >Auditing what changed between two commits
  • >Sharing diffs with explanations for teammates

Frequently Asked Questions

>What diff format does it accept??
Unified diff — the default output of git diff. Paste it directly or upload a .diff/.patch file. Binary changes and renames are detected where the header includes them.
>Is my code sent anywhere??
No. Diff parsing and rendering happen entirely in your browser.
>Why do some lines show no line numbers??
Added lines have no old line number and removed lines have no new line number — that is how unified diffs work.