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
//Related tools
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