DevKits

Code Diff — Side-by-Side with Syntax Highlighting

Compare two code snippets side-by-side or in unified view, with syntax highlighting for JavaScript, TypeScript, Python, Go, Rust, Java, C#, SQL, CSS, HTML, JSON, YAML, and shell. Ignore whitespace / case options. 100% local.

Last updated:

Comments
+ 35= 2
1function greet(name) {1+function greet(name = "world") {
2 if (!name) {2+ // Default parameter added in ES2015
3 return "Hello, world";3+ return `Hello, ${name}`;
4 }
5 return "Hello, " + name;
6 }4 }
7 5

Frequently Asked Questions

How is this different from the plain Text Diff tool?

Text Diff is optimised for arbitrary text (config, logs, notes) with a single-view line diff. Code Diff adds syntax highlighting for 14 languages, a side-by-side view, and options to ignore whitespace / case — so reviewing a refactor or a copy-pasted snippet is easier on the eyes.

Which languages have highlighting?

JavaScript, TypeScript, Python, Go, Rust, Java, C#, SQL, CSS, HTML/XML, JSON, YAML, Shell/Bash, and plain text. The tokenizer identifies keywords, strings, comments, and numbers — enough to make code readable in the diff view.

Can this replace git diff?

For quick two-snippet comparisons — yes. For real code reviews you still want git diff (it understands renames, follows history, integrates with hunks). Use this when the two things you're comparing don't live in a git repo yet (paste from a chat, a PR review email, or a coworker's screen).

Related Tools