Compare two pieces of text with line-level and character-level highlighting.
| 1 | -function greet(name) { |
| 2 | - console.log("Hello, " + name); |
| 3 | return true; |
| 4 | } |
| 5 | |
| 6 | function add(a, b) { |
| 7 | return a + b; |
| 8 | } |
| 9 | |
| 10 | // Main |
| 11 | const result = add(2, 3); |
| 12 | -console.log(result); |
| 1 | +function greet(name, greeting = "Hello") { |
| 2 | + console.log(greeting + ", " + name + "!"); |
| 3 | return true; |
| 4 | } |
| 5 | |
| 6 | function add(a, b) { |
| 7 | + if (typeof a !== "number" || typeof b !== "number") { |
| 8 | + throw new Error("Arguments must be numbers"); |
| 9 | + } |
| 10 | return a + b; |
| 11 | } |
| 12 | |
| 13 | // Main |
| 14 | const result = add(2, 3); |
| 15 | +console.log("Result:", result); |
Paste the original text on the left and the modified text on the right.
Additions (green) and deletions (red) are highlighted in real time as you type.
Switch between side-by-side and unified views. Character-level highlighting shows exactly what changed within lines.
Each tool works standalone, runs entirely in your browser, and requires no signup.
Varstatt is a one-person product studio run by Jurij Tokarski, product engineer since 2011. These tools are free and open — no signup, no catch.