Git Diff Viewer
Paste unified diff or git diff output and visualize color-coded changes with line numbers, file summaries, and side-by-side comparison.
Learn More
Git Commands Cheat Sheet
Quick reference for essential git commands including diff, log, merge, rebase, and more.
Git Commands Every Developer Should KnowDeep dive into the most important git commands with practical examples and tips.
Diff Checker ToolCompare two pieces of text directly and see differences highlighted line-by-line.
Frequently Asked Questions
A git diff is a text-based representation of changes between two versions of a file. Lines starting with '+' are additions, lines starting with '-' are deletions, and lines with no prefix are unchanged context. The @@ headers show which line numbers are affected. This tool parses that output and renders it with color-coding and line numbers for easy reading.
This viewer supports standard unified diff format (produced by 'diff -u') and git diff format (produced by 'git diff', 'git show', or 'git log -p'). It correctly parses file headers, hunk headers, added/removed/context lines, rename detection, binary file notices, and multi-file diffs.
Yes. This tool offers both unified view (all changes inline) and side-by-side view (old file on the left, new file on the right). Toggle between views using the view mode buttons. Side-by-side view makes it easier to compare the before and after state of each file.
No. All diff parsing and rendering happens entirely in your browser using JavaScript. No data is uploaded to any server. Your code and diffs never leave your machine, making this tool safe to use with proprietary or sensitive source code.
You can generate diffs using several commands: 'git diff' shows unstaged changes, 'git diff --staged' shows staged changes, 'git diff HEAD~1' shows the last commit's changes, 'git show <commit>' shows a specific commit, or 'diff -u file1 file2' compares two files. Copy the entire output and paste it into the input area.