🔀 Diff Checker

Compare two texts instantly. Differences are highlighted line by line with character-level precision — free, private, no login required.

Original
Modified
Original
The quick brown fox
jumps over the lazy
dog.
Modified
The quick brown fox
The swift red fox
jumps over the lazy
sleeping dog.

Paste text in both panels to compare

Works with code, documents, configs, articles — any text. Differences are highlighted line by line with character-level precision.

Everything You Need to Compare Text

From a quick change check to deep code review — built for developers, writers, and anyone who needs to know exactly what changed.

Instant Line Diff

Uses the LCS algorithm for accurate line-by-line comparison — the same approach as Git diff.

🔬

Character-Level Highlights

Within changed lines, exactly which characters were added or deleted are shown with inline highlights.

📊

Similarity Score

Visual ring chart showing the percentage of content in common between the two texts.

📈

Change Stats

Lines added, removed, unchanged, characters changed, words changed, and change density at a glance.

🗺️

Change Heatmap

Document minimap showing where changes are concentrated — instantly see if edits are scattered or grouped.

↔️

Unified & Split View

Unified view for a compact diff, or split view to compare original and modified side by side.

⚙️

Flexible Options

Ignore whitespace differences, ignore case, or toggle line numbers to focus on what matters.

🔒

100% Private

All comparison happens in your browser — no text is ever sent to any server.

📋

Copy & Swap

Copy the diff as plain text, or swap original and modified with one click.

Who Uses This Diff Checker?

Developers comparing code, writers tracking edits, DevOps engineers reviewing config changes, and anyone needing a fast text comparison.

💻

Code Review

Compare code before and after refactoring, or review what changed between two versions of a file.

📝

Document Editing

Track changes between drafts of essays, articles, reports, or legal documents.

⚙️

Config File Changes

See exactly what changed in JSON, YAML, TOML, or INI configuration files between environments.

🔍

Proofreading

Compare an edited version against the original to verify only intended changes were made.

🗄️

Database Schemas

Compare SQL schema versions or migration scripts to understand structural changes.

🌐

API Response Diff

Paste two API responses to spot unexpected field changes or new error messages.

Frequently Asked Questions

Everything about how the diff algorithm works, what the stats mean, and how to get the most out of the tool.

What is a diff checker?

A diff checker (short for 'difference checker') is a tool that compares two pieces of text and highlights what has changed between them. It shows additions (lines added in the modified version), deletions (lines removed from the original), and unchanged lines. Diff checkers are widely used by developers, writers, and editors to track changes between file versions.

How does the diff algorithm work?

This tool uses the LCS (Longest Common Subsequence) algorithm — the same underlying approach used by Git and Unix diff. It finds the longest sequence of lines that appear in both texts in the same order. Lines not in the common sequence are marked as added or deleted. For changed lines, a second character-level LCS pass highlights exactly which characters within the line were modified.

What is the difference between unified and split view?

Unified view shows both original and modified text in a single panel, with added lines marked + in green and removed lines marked − in red — similar to 'git diff' output. Split view shows original on the left and modified on the right simultaneously, with aligned rows so you can compare corresponding lines side by side. Unified view works on all screen sizes; split view is ideal on wider screens.

What does the similarity percentage mean?

The similarity percentage is calculated using the Dice coefficient formula: (2 × unchanged lines) / (total original lines + total modified lines) × 100. A score of 100% means the texts are identical. 0% means they share no common lines. This metric gives a quick sense of how much of the content remained the same.

What is character-level highlighting?

When a line is modified (appears as both deleted and added), the tool runs a second diff on the characters within that line. The specific characters that were deleted are shown with a darker red background, and the new characters are shown with a darker green background. This lets you see at a glance whether just a few words changed in an otherwise identical line.

Can I compare code with this tool?

Yes — the diff checker works with any plain text, including code in any programming language (JavaScript, Python, Java, Go, SQL, HTML, CSS, JSON, YAML, etc.), configuration files, markdown, and more. The monospace font display preserves code indentation and formatting.

What does 'Ignore whitespace' do?

When 'Ignore whitespace' is enabled, leading/trailing spaces are trimmed and consecutive whitespace is collapsed to a single space before comparison. Lines that differ only in whitespace (indentation, trailing spaces) are treated as equal. This is useful when comparing code that was reformatted but not logically changed.

Is my text safe to paste here?

Completely. All comparison happens entirely in your browser using JavaScript — no text is ever sent to any server. You can safely paste confidential code, documents, or configurations. The page works offline once loaded.

How many lines can I compare?

The tool handles up to 1,500 lines per text efficiently using the LCS algorithm. For very large texts (over 1,500 lines per side), it automatically falls back to a simplified comparison that still shows all additions and deletions. For typical use cases — documents, code files, configs — performance is near-instant.

What do the green and red highlights mean?

Green lines (marked with +) are lines that exist in the modified text but not in the original — they were added. Red lines (marked with −) are lines from the original that don't appear in the modified text — they were removed. Gray/neutral lines are unchanged. Within changed lines, darker green/red highlights show the exact characters that differ.

What is the change heatmap?

The change heatmap (visible on the left side of the diff on desktop) is a minimap of the entire document. Each pixel-row represents a group of lines: green pixels show additions, red pixels show deletions, orange shows mixed changes, and gray shows unchanged sections. It gives you an instant visual overview of where changes are concentrated in a long document.

Can I copy or export the diff result?

Yes — click the 'Copy Diff' button to copy the diff in a simple + / - / space format to your clipboard. Each line is prefixed with + (added), - (removed), or a space (unchanged). This format is compatible with patch files and can be read by most diff tools.