Code Diff Viewer

Paste two versions of any code snippet and instantly see what changed. Choose between unified diff (GitHub-style) or split side-by-side view. Added lines are highlighted green, removed lines red. Shows exact +/- line counts. Runs 100% in your browser — nothing is sent to any server.

Frequently Asked Questions

How do I compare two code files online?

Paste the original code on the left and the modified version on the right. The tool instantly highlights additions (green), deletions (red), and unchanged lines. Switch between unified (GitHub-style) and split side-by-side views.

What is the difference between unified and split diff?

Unified diff shows changes in a single column with + and - markers, like GitHub pull requests. Split diff shows the old and new versions side by side in two columns, making it easier to compare line-by-line changes in longer files.

Can I use this to compare JSON, YAML, or SQL?

Yes. This tool compares any plain text — code in any language, JSON configs, YAML files, SQL queries, Markdown, or even plain prose. It works on a line-by-line basis regardless of the content format.

Is my code safe when pasting it here?

Yes. The diff comparison runs entirely in your browser. No code is sent to any server. Your source code stays completely private on your machine.

Share this tool: X / Twitter LinkedIn

Related Products

on Gumroad

More Free Tools

Get weekly developer tips

Tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →