← All text tools

Git Diff Viewer

Paste a unified diff or git patch and see every file drawn side by side or in one column, with line numbers, added and removed lines highlighted and a summary.

  • Free
  • No sign-up
  • Works on any device

About Git Diff Viewer

A unified diff, as printed by git diff, git show or saved in a .patch file, is hard to read as plain text. Paste it here and each file is drawn as a table with old and new line numbers, removed lines in red and added lines in green, either side by side or in one column. Blocks of removed lines are placed next to the lines that replace them, and new, deleted, renamed and binary files are labelled. Nothing is applied or changed: the page only reads and draws the patch. Example: a hunk with one removed and two added lines shows as 2 added, 1 removed.

How to use Git Diff Viewer

  1. Paste the diff output or the contents of a .patch file.
  2. Choose side by side or a single column view.
  3. Scroll through the files, read the summary of added and removed lines and copy anything you need from the page.

Why use this tool?

Also known as

Frequently asked questions

Which diff formats are supported?

Unified diffs with @@ hunk headers: git diff, git show, git format-patch files and the output of diff -u. Context diffs and old normal diffs are not recognised.

Does it change or apply the patch?

No, it only displays it. To create or apply a patch, use the unified diff patch tool on this site.

Why is a file shown with no lines?

Binary files, pure renames and permission changes have no text hunks, so only a label is shown. Everything with a text hunk is drawn with its line numbers.

Is Git Diff Viewer free?

Yes. Git Diff Viewer on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.