Compare two texts or files side-by-side. Additions in green, deletions in red β all processed in-browser.
| Mode | Granularity | Best for |
|---|---|---|
| Line | Entire lines | Source code, config files, log comparison |
| Word | Individual words | Prose, documentation, markdown |
| Character | Single characters | Typos, invisible chars, encoding differences |
The unified diff format is the standard output format used by Git, patch utilities, and code review tools. Lines starting with + were added, lines starting with - were removed, and lines without a prefix are unchanged context.
@@ -1,4 +1,4 @@
function greet(name) {
- console.log("Hello, " + name + "!");
+ console.log(`Hello, ${name}!`);
return true;
}A diff (difference) shows what changed between two versions of a text. Lines prefixed with + are additions (in green), lines prefixed with - are deletions (in red), and unchanged lines are shown without a prefix. Diffs are the foundation of version control systems like Git.
Line diff compares entire lines and is best for code and prose. Word diff highlights individual words that changed within a line, useful for detecting small edits in paragraphs. Character diff shows every single character change, ideal for finding typos, invisible characters, or encoding differences.
Paste the original content in the left panel and the modified content in the right panel, then click Compare. The highlighted diff shows exactly what changed. Use Line mode for code, Word mode for prose, or Character mode for fine-grained inspection.
Yes. All comparison happens entirely in your browser using JavaScript. No text is sent to any server. The tool works offline after the initial page load.