View a Git Diff Online
Color-Coded Viewer for .patch and .diff Files
Need to use View a Git Diff Online right now?
Same green/red convention GitHub uses, applied to any raw patch file you paste or upload.
Features
- Runs entirely in your browser
- Privacy-first — your data is never uploaded
- Real-time, instant results
- 100% free, no sign-up required
- Works on desktop, tablet, and mobile
- No installation needed
Who uses this tool?
About View a Git Diff Online
A raw .patch or .diff file is plain text, but reading it that way makes it hard to quickly tell what was added versus removed — the +/- prefixes are there, but without color they blend together in a wall of monospace text.
This tool color-codes a patch or diff file line by line: added lines in green, removed lines in red, hunk headers (the @@ markers showing line numbers) in blue, and file headers bolded — the same visual convention used by Git and GitHub's own diff views — plus a summary count of total lines added and removed.
This works with standard unified diff format, the output of `git diff`, `git format-patch`, and most version control and code review tools, since that format is the de facto standard for representing line-based changes.
How it works
- Paste or upload the patch file. Paste the diff text directly, or upload a .patch or .diff file.
- Review the color-coded view. Added, removed, and header lines are visually distinguished.
- Check the summary count. See the total lines added and removed at a glance.
Examples
Simple diff
Input
-const x = 1; +const x = 2;
Output
The removed line shown in red, the added line shown in green.