DevBolt
Processed in your browser. Your data never leaves your device.
← Back to tools

Git Diff Viewer

Paste unified diff output (from git diff) and view it with syntax highlighting, line numbers, and side-by-side or inline display.

Ctrl+Enter to parse
Samples:

Paste a unified diff above to render it with syntax highlighting and line numbers.

Frequently Asked Questions

How do I read git diff output?
Git diff output shows changes using unified diff format. Lines starting with --- indicate the original file and +++ the modified file. @@ markers show line number ranges. Lines prefixed with - (red) were removed, + (green) were added, and no prefix are unchanged context. DevBolt's Git Diff Viewer parses this raw output and renders it with syntax highlighting. You can toggle between inline mode (changes shown sequentially) and side-by-side mode (old and new versions in parallel columns) for easier comparison.
What is the difference between inline and side-by-side diff views?
Inline diff shows changes sequentially in a single column — removed lines in red followed by added lines in green. This is compact and matches the standard unified diff format. Side-by-side view displays the old version on the left and new version on the right with corresponding lines aligned. Side-by-side is easier for reviewing modifications to individual lines. Inline is better for insertions, deletions, and narrow viewports. Most code review tools like GitHub default to side-by-side but let you toggle.
How do I generate a git diff to paste into the viewer?
Run git diff for unstaged changes, git diff --staged for staged changes, or git diff HEAD~1 to compare against the previous commit. To compare branches, use git diff main..feature-branch. Copy the output from your terminal or redirect it to a file with git diff > changes.patch. Paste the raw unified diff output into DevBolt's viewer to see it rendered with syntax highlighting and color-coded changes, which is much easier to read than raw terminal output.

Related Inspect Tools