Diff Checker

Compare two texts and see line-by-line differences side-by-side or unified. 100% client-side — your data never leaves your browser.

4
Added
4
Removed
3
Unchanged
135 chars
184 chars
📋 DifferencesSide-by-side
1
function greet(name) {
2
console.log("Hello, " + name);
—
—
3
return true;
4
}
5
6
const users = ["Alice", "Bob"];
7
users.forEach(u => greet(u));
—
—
—
—
1
function greet(name, greeting = "Hello") {
2
console.log(greeting + ", " + name + "!");
3
return true;
4
}
5
—
—
6
const users = ["Alice", "Bob", "Charlie"];
7
users.forEach(u => greet(u, "Hi"));
🔒 100% private: All diff computation happens in your browser using the Myers diff algorithm. Your data never leaves your device.

About Diff Checker

A diff checker shows exactly what changed between two versions of a text, code file, or document. It is the foundation of version control tools (git diff), code review workflows, and content editing — showing additions in green, deletions in red, and unchanged lines in gray. This tool implements the Myers diff algorithm (the same one used by Git) entirely in your browser. Paste two versions of any text — code, prose, CSV, JSON, or config — and instantly see what changed. Choose from side-by-side or unified views, and toggle ignore-case and ignore-whitespace for flexible comparisons.

How It Works

  1. Paste the original text in the left box and the changed text in the right box.
  2. Choose a view mode: Side-by-side (parallel) or Unified (Git-style).
  3. Optionally enable "Ignore case" or "Ignore whitespace" for fuzzy comparison.
  4. Review the diff — added lines are green, removed lines are red, unchanged lines are gray.

✨ Key Features

  • ✓Side-by-side view (parallel columns)
  • ✓Unified view (Git-style +/-)
  • ✓Line-level diff (Myers algorithm)
  • ✓Word-level highlighting within changed lines
  • ✓Ignore case option
  • ✓Ignore whitespace option
  • ✓Statistics: additions, deletions, unchanged lines
  • ✓Live diff as you type
  • ✓Copy any side or the diff result
  • ✓100% client-side — no data sent to any server

🎯 Common Use Cases

  • →Reviewing code changes before committing
  • →Comparing two versions of a document
  • →Finding differences between config files
  • →Debugging which lines changed after an edit
  • →Verifying API response differences
  • →Comparing CSV or JSON datasets
  • →Checking translations or copy variations
  • →Teaching diff concepts to students

💡 Advanced Tips & Pro Insights

  • ▸The Myers diff algorithm (used here) is the same one Git uses internally — it finds the shortest "edit script" between two sequences.
  • ▸Ignore whitespace is useful when comparing code where indentation differs (e.g., tabs vs spaces).
  • ▸Ignore case is helpful when comparing text where capitalization varies, like product names or headings.
  • ▸For very large files (>10,000 lines), diff performance depends on browser memory. Split the file or use a desktop tool like Meld or Beyond Compare.
  • ▸The unified view format matches git diff output — handy for sharing diffs in code reviews or bug reports.

Frequently Asked Questions

Is this diff checker free?▾
Yes, this diff checker is completely free with no signup, email, or usage limits.
Is my data safe?▾
Yes, 100% safe. All diff computation happens in your browser. Your text is never sent to any server.
How does it work?▾
The tool uses the Myers diff algorithm — the same algorithm Git uses internally — to compute the shortest edit script between two texts. It then renders the result as side-by-side or unified diff.
What is the difference between side-by-side and unified views?▾
Side-by-side shows the original and modified versions in parallel columns with matching lines aligned. Unified (Git-style) shows both versions interleaved — unchanged lines prefixed with a space, additions with +, and removals with -.
Does it support word-level diff?▾
Yes, for lines that are similar but not identical, the tool highlights the specific words that changed — so you can spot small edits within a long line.
What does "Ignore case" do?▾
When enabled, "Hello" and "hello" are considered identical — useful when capitalization differences do not matter for your comparison.
What does "Ignore whitespace" do?▾
When enabled, spaces, tabs, and differences in indentation are ignored. Useful when comparing code that was reformatted or when whitespace is not significant.
Can I compare files instead of pasting text?▾
This tool accepts pasted text. For file comparison, open each file in a text editor, copy the content, and paste into the two text boxes.