Text Diff Checker
Paste an original and a changed version to get an instant LCS-based line diff. Added lines are highlighted green, removed lines red, with running counts and a copyable unified diff — all private, in your browser.
Compare Text
Line diff, live as you type
How to use this tool
Paste Original
Drop the original text or code into the left box — the version you're comparing against.
Paste Changed
Drop the new version into the right box; the diff updates live as you type.
Read the Diff
Green lines were added, red lines were removed, neutral lines are unchanged. Copy the result as a unified diff.
Use the Swap button to flip which side counts as the original, and Sample to load a ready-made example and see the colours instantly.
Everything runs in your browser — nothing is uploaded or stored.
Spot Every Change Between Two Versions
A text diff checker answers one deceptively simple question: what changed between version A and version B? Whether you're reviewing an edit to a paragraph, confirming a config tweak, or eyeballing a code change before you commit it, scanning two blocks of text by eye is slow and error-prone. This tool does it instantly — paste the original on one side and the changed text on the other, and it highlights every added line in green, every removed line in red, and leaves untouched lines neutral, with running counts of each.
What It Actually Does
The checker splits both inputs into lines and computes a line-by-line diff using the Longest Common Subsequence (LCS) algorithm — the same foundation used by Git and the classic Unix diff. The LCS is the longest ordered set of lines common to both texts. Those shared lines are anchored as "unchanged," and the gaps between them become additions (present only in the Changed side) or removals (present only in the Original side). Line endings are normalised first, so a file saved on Windows and one saved on macOS won't appear different on every row.
A Worked Example
Suppose your original function is:
function greet(name) {
console.log("Hi " + name);
return true;
}
and the new version is:
function greet(name) {
if (!name) return false;
console.log("Hello, " + name + "!");
return true;
}
The diff anchors the three lines that match exactly — function greet(name) {, the closing }, and return true; — as unchanged. It then reports:
- Removed (red):
console.log("Hi " + name); - Added (green):
if (!name) return false; - Added (green):
console.log("Hello, " + name + "!");
Counts come out to 2 added, 1 removed, 3 unchanged. Because the changed console.log line differs from the original, it shows as one removal plus one addition rather than an in-place edit — exactly how a code review tool would present it, so you can read both versions in context.
When Developers and Writers Reach for It
- Code review: Confirm exactly which lines a patch touches before merging or pasting it into a file.
- Config debugging: Diff a working
.env, YAML, or JSON file against a broken one to find the line that drifted. - Content editing: Compare a draft against an edited version to see precisely which sentences a reviewer rewrote.
- Log comparison: Spot the new line in an error log that appeared after a deploy.
- Migrations: Verify that a generated or reformatted file matches the original aside from intended changes.
Use the Swap button to flip which side counts as "original," and Sample to load a ready-made example to see the colours in action. You can copy the full result as a unified-style diff (lines prefixed with +, -, or a space) to paste into a ticket, commit message, or chat.
Built for Privacy
Unlike many online comparison tools, this checker never transmits anything. All parsing and diffing happen locally in your browser, so confidential source code, legal text, or unreleased copy stay on your machine. Nothing is logged, stored, or sent anywhere — close the tab and it's gone.
Pairs Well With Other Dev Tools
A diff is often the last step in a cleanup workflow. Format both sides first with the JSON formatter so structural changes stand out instead of whitespace noise, and use the word & character counter when you need exact length or token figures for the text you're comparing.