Text Diff

Compare two pieces of text with line-level and character-level highlighting.

+6 added-3 removed
1-function greet(name) {
2- console.log("Hello, " + name);
3 return true;
4}
5
6function add(a, b) {
7 return a + b;
8}
9
10// Main
11const result = add(2, 3);
12-console.log(result);
1+function greet(name, greeting = "Hello") {
2+ console.log(greeting + ", " + name + "!");
3 return true;
4}
5
6function 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
14const result = add(2, 3);
15+console.log("Result:", result);

How It Works

1

Enter two texts

Paste the original text on the left and the modified text on the right.

2

See changes live

Additions (green) and deletions (red) are highlighted in real time as you type.

3

Review changes

Switch between side-by-side and unified views. Character-level highlighting shows exactly what changed within lines.

FAQ

The tool uses a line-level diff algorithm, then applies character-level diffing within changed lines for precise highlighting.
Yes. It works with any plain text — code, prose, config files, logs, etc.
No hard limit, but very large texts (100K+ lines) may take a moment to process.

Varstatt Toolkit

Each tool works standalone, runs entirely in your browser, and requires no signup.

Built & Maintained by Varstatt

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.