Free Git Diff Viewer - Review Patch Files and Unified Diffs

Paste or upload a patch, inspect changed files and hunks in unified or split view, filter by status, search within the diff, and export raw patch text, a concise summary, or parsed JSON.

Changed Files
src/components/Button.tsx
modified · 1 hunk
Hunk 1 / 1
@@ -1,13 +1,21 @@
1
1
import clsx from "clsx";
2
2
3
3
interface ButtonProps {
4
4
children: React.ReactNode;
5
+ loading?: boolean;
5
6
}
6
7
7
-export function Button({ children }: ButtonProps) {
8
+export function Button({ children, loading = false }: ButtonProps) {
8
9
return (
9
- <button className={clsx("rounded-lg px-4 py-2 bg-blue-600 text-white")}>
10
- {children}
10
+ <button
11
+ className={clsx(
12
+ "rounded-lg px-4 py-2 bg-blue-600 text-white disabled:opacity-60",
13
+ )}
14
+ disabled={loading}
15
+ >
16
+ {loading ? "Saving..." : children}
11
17
</button>
12
18
);
13
19
}
Export
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index 43ab201..91ca2bd 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -1,13 +1,21 @@
 import clsx from "clsx";
 
 interface ButtonProps {
   children: React.ReactNode;
+  loading?: boolean;
 }
 
-export function Button({ children }: ButtonProps) {
+export function Button({ children, loading = false }: ButtonProps) {
   return (
-    <button className={clsx("rounded-lg px-4 py-2 bg-blue-600 text-white")}>
-      {children}
+    <button
+      className={clsx(
+        "rounded-lg px-4 py-2 bg-blue-600 text-white disabled:opacity-60",
+      )}
+      disabled={loading}
+    >
+      {loading ? "Saving..." : children}
     </button>
   );
 }
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 7c0b234..ad65e51 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -12,7 +12,7 @@ export default function HomePage() {
       <main className="mx-auto max-w-4xl p-8">
         <h1 className="text-4xl font-bold">Welcome</h1>
         <p className="mt-4 text-slate-600">
-          Ship faster with a cleaner component system.
+          Ship faster with a cleaner and more resilient component system.
         </p>
       </main>
     </>

Tired of memorizing Git commands? Use Tower — the Git client built for pros.

Visual Git client · Mac & Windows · Used by 100,000+ developers

Try Tower

Affiliate link — we may earn a commission at no extra cost to you.

More Developer Tools

Overview

What A Good Git Diff Viewer Should Do

A useful diff viewer should not stop at pretty colors. It should help you understand what changed, which files matter most, where the risky hunks are, and how to move through a patch without getting lost.

That means file-level stats, hunk navigation, unified and split layouts, quick search, and honest warnings when the diff is malformed, truncated, binary, or just too large to trust at a glance.

What This Tool Covers

  • Paste or upload `.diff` and `.patch` files.
  • Unified and split diff views.
  • File filtering, hunk navigation, and search.
  • Exports for raw patch text, review summary, and parsed JSON.

How To Use It Well

1. Start with the file list

Use the file sidebar first to understand scope before diving into line-level details.

2. Switch views intentionally

Unified view is faster for scanning, while split view is better for line-for-line comparison and replacements.

3. Use hunk navigation

Jump between hunks instead of scrolling blindly through long diffs.

4. Search before you skim

Search for critical identifiers, feature flags, APIs, or files you know are risky.

5. Hide long unchanged stretches

Collapse bulky context when you want faster review without losing the local neighborhood around edits.

6. Export what you need

Raw patch is useful for tooling, summary is useful for humans, and JSON is useful when another system needs structured data.

Unified View

Best for fast review. You see removals and additions in one stream, which makes patch scanning and comment drafting much easier.

Split View

Best for careful comparison. It is especially helpful when lines are being edited rather than simply added or removed.

Warnings Matter

A malformed or giant diff can create false confidence. Warning banners are there to tell you when the parsed view may not tell the whole story.

When This Is Great

It is ideal for reviewing pasted patches from chat, quick PR exports, generated patch files, code-review demos, and situations where you want a focused diff view without opening a full git host.

What It Does Not Replace

It does not replace a full code review platform, blame history, branch context, CI status, or inline team discussion. It is a focused diff-analysis utility, not a complete collaboration system.

Frequently Asked Questions

What kinds of files can I paste here?+

Unified git diffs and patch files are the main target. The parser also tries to warn you when the input looks malformed or incomplete.

Can it show renamed or deleted files?+

Yes. The parser detects added, modified, deleted, and renamed file statuses when that metadata exists in the diff.

Why offer both raw and JSON export?+

Raw patch text is good for humans and tooling, while JSON is useful if you want to pipe parsed diff data into another review or reporting system.

What happens with binary patches?+

The tool warns about binary diffs and shows file-level metadata, but it does not attempt to render binary content as code lines.

Should I trust the parsed view for every patch?+

Trust it as a review aid, but not blindly. If the tool warns about malformed input, truncated output, or oversized diffs, you should verify the original patch source too.