Code Diff
See exactly what changed. Compare two versions, inspect each edit, and move changes in either direction.
Ready to compare. Paste your versions or try the example.
Darker highlights mark changed characters or words. Arrows replace the corresponding change on the other side. Both columns share one scroll area.
--- original
+++ modified
@@ -1,9 +1,9 @@
const project = {
name: "MRHTML",
- theme: "light",
- tools: 4,
+ theme: "dark",
+ tools: 24,
};
-function greet(name) {
- return "Hello, " + name;
+function greet(name = "world") {
+ return `Hello, ${name}!`;
}
const project = {
name: "MRHTML",
theme: "light",
tools: 4,
};
function greet(name) {
return "Hello, " + name;
}
const project = {
name: "MRHTML",
theme: "dark",
tools: 24,
};
function greet(name = "world") {
return `Hello, ${name}!`;
}
Local comparison · Up to 200,000 characters and 2,500 lines per side · Ctrl/Cmd + Enter to compare · Tab indents code. Press Escape, then Tab to leave the editor.
Compare, inspect, and merge code
Paste the earlier version into Original and the newer version into Changed. Select Find difference to open an aligned comparison. Red marks removed content, green marks additions, and stronger highlights show the exact characters or words that differ inside a changed line. Line numbers and plus/minus labels make the differences understandable without relying only on color.
Apply an individual change
Use the right arrow to replace the Changed block with the Original block, or the left arrow to apply the Changed block to Original. The comparison recomputes after each transfer. Undo merge restores the preceding pair of versions. Edit inputs returns to the editors; manual edits invalidate the previous result and merge history so an old change cannot overwrite newer text. Editor undo remains available with Ctrl/Cmd + Z.
Review and export
Previous and Next change move through changed blocks. Side-by-side view shares one scroll area so corresponding rows stay aligned; on narrow screens, each row stacks Original above Changed with both merge actions labelled. Unified patch view includes three unchanged context lines around each change. Copy or download either current version, or export the patch with original and modified file labels.
Line endings and limits
Windows CRLF, Unix LF, and old Mac CR line endings compare equally; applying a merge normalizes the two current versions to LF. A missing final newline remains a real difference and is marked explicitly. Moves appear as removals and additions. This tool compares text, not program meaning, and does not resolve syntax conflicts automatically.
The comparison runs in a cancellable worker with a ten-second watchdog and bounded work and memory. Inputs are limited to 200,000 characters and 2,500 lines per side. Very complex within-line changes may use a coarser highlight, with a visible notice. No pasted code is executed, uploaded, or saved to an account. The sample updates a project's theme and tool count, then changes its greeting function.