All tools
Development tools

Diff Checker

Compare two texts side-by-side and highlight every addition, deletion and change — down to the character level.

Side-by-side view Inline view Character-level diff Line numbers Ignore whitespace Download patch
Get started free Sign in

Free · No credit card · 50 credits/day

View modes and features

↔️

Side-by-side

Original on the left, modified on the right. Changed lines highlighted in red/green. Best for reviewing large changes.

📋

Inline view

Additions and deletions shown in a single column with + and − markers. Compact and great for patch files.

🔤

Character-level diff

Within changed lines, shows exactly which words or characters were added or removed — not just which lines.

🔢

Line numbers

Both original and modified line numbers shown next to each line, making it easy to navigate back to your editor.

Ignore whitespace

Option to skip differences that are only indentation or trailing space changes — useful for reformatted code.

📥

Download patch

Export the diff as a unified .patch file that can be applied with the standard `patch` command.

Frequently asked questions

What is the difference between unified diff and context diff?

A unified diff shows 3 lines of context around each change in a single stream, with + for additions and - for deletions. A context diff shows the same context but in two separate sections. Unified diff is the standard for patches and pull requests; both formats can be applied with the patch command.

How does git diff work?

git diff compares files using the Myers diff algorithm, which finds the shortest edit script to transform one file into another. It outputs changes in unified diff format with @@ hunk headers. "git diff" shows unstaged changes; "git diff --staged" shows staged changes; "git diff HEAD" shows all uncommitted changes.

What is a 3-way merge?

A 3-way merge compares three versions: the common ancestor, version A (your branch) and version B (the branch you're merging). Changes in only one branch are applied automatically; changes to the same lines in both branches create a conflict. Git uses 3-way merges by default for non-fast-forward merges.

Can I use a diff tool to compare JSON or code?

Yes — a text diff tool works on any plain text content including JSON, YAML, SQL, HTML and JavaScript. For JSON comparison, run both files through a JSON formatter first to normalize whitespace and key order, which avoids false positives from formatting differences.

Related dev tools

Format your code before diffing for cleaner results.

JSON Formatter

Format JSON before diffing to avoid whitespace-only false positives.

Markdown Previewer

Preview Markdown changes live before committing them.

SQL Formatter

Format SQL queries before comparing different versions.

See exactly what changed

Free account. 50 credits per day. Access to 75+ tools instantly.

Create free account →