All processing happens locally in your browser · No data uploaded

Code Diff Checker

Find differences between two code snippets or text documents with syntax-highlighted diff view. Supports both inline and side-by-side modes. Great for code reviews, comparing config files, or text comparison.

Original

Modified

+4 added-4 removed
Unified Diff
+
function greet(name, greeting = "Hello") {
+
  console.log(greeting + ", " + name + "!");
+
  return { name, greeting };
+
}
-
function greet(name) {
-
  console.log("Hello, " + name);
-
  return name;
-
}

Diff Algorithms

Myers diff algorithm: finds minimum edit distance

Edit operations:
+ Addition (green)
- Deletion (red)
  No change (white)

Unified diff format:
@@ -start,count +start,count @@

Examples

Compare two functions

Result: 1 changed line (function signature), 1 changed line (return)

Added parameter c visible in red/green diff highlighting.

Frequently Asked Questions

Is my code safe?

Yes. Diff comparison happens entirely in your browser. No code is sent to any server.

Can I compare non-code text?

Yes. The diff tool works on any text — code, markdown, config files, JSON, SQL, or plain prose.