Skip to main content
UnblockDevs
↕️

Text & Code Diff Checker

Compare two texts or code files instantly. Line-level and inline character diffs, unified or side-by-side view. Looks and feels like a real code editor — 100% in-browser.

100% in-browserLine & char diffSide-by-sideNo signup
AOriginal
BChanged
A————————B

Paste text in both editors above to see the diff

The Fastest Way to See What Changed Between Two Texts

Whether you are reviewing a code change, comparing two config files, checking a document revision, or debugging an API response difference — you need to know exactly what changed, fast. Opening a local diff tool or standing up a Git repo just to compare two strings is overkill.

Paste both versions and the diff appears immediately. Added lines are highlighted green, removed lines are red. Enable inline character diff to see exactly which characters changed within a line — not just which lines changed. Switch between unified (git-style) and side-by-side layouts. Filter to show only changed lines. Ignore whitespace or case when those differences do not matter. Copy the full diff output with one click. Everything runs in your browser — your code never leaves your device.

How it works

Paste, Diff, Copy — In Seconds

01

Paste the original

Paste the "before" version of your text, code, config, or JSON in the left box (A — Original).

02

Paste the changed version

Paste the "after" version in the right box (B — Changed). The diff renders automatically.

03

Read the diff

Green lines are additions (+), red lines are removals (−). Enable "Inline char diff" to highlight exactly which characters within a line changed.

04

Switch views and copy

Toggle between Unified and Side-by-side views. Use "Show only changes" to hide context lines. Copy the full diff output with one click.

Use cases

When Developers Reach for a Diff Tool

🔍

Code Review

Quickly see what changed between two versions of a function, component, or file without switching to your IDE.

⚙️

Config Comparison

Compare YAML, JSON, TOML, or .env files across environments to spot differences before a deployment.

📄

Document Revision

Track changes between drafts of specs, PRDs, or documentation without a dedicated writing tool.

🔧

API Response Debugging

Paste two API responses to find the exact field that changed between a working and a broken request.

🤖

AI Output Comparison

Compare LLM outputs across prompts or model versions to see what changed in the generated text.

📋

SQL Query Diff

Spot differences between two SQL queries or migration scripts to catch accidental changes before running them.

FAQ

Frequently Asked Questions

1How does the diff algorithm work?
The tool uses the Longest Common Subsequence (LCS) algorithm — the same approach used by Git and Unix diff. It finds the largest set of lines that appear in both texts, then marks everything else as added or removed.
2What is the difference between unified and side-by-side view?
Unified view interleaves both texts in one column, with "+" for added lines and "−" for removed ones — the same format as git diff output. Side-by-side shows original on the left and modified on the right, aligned by line for easy visual scanning.
3Is my text sent to a server?
No. All comparison and highlighting runs entirely in your browser using JavaScript. Your code, configs, and documents never leave your device.
4Can I compare files with whitespace differences only?
Yes. Enable "Ignore whitespace" to trim leading and trailing spaces from each line before comparison. Combine with "Ignore case" to focus purely on meaningful content differences.
5How do I diff two HTML files to find what changed?
Format both HTML files first to normalise indentation and whitespace — otherwise minified HTML will show the entire file as one changed line. Paste both formatted versions into the two inputs and the diff highlights exactly which tags, attributes, or text changed. Enable "Ignore whitespace" to skip formatting-only differences.
6How does a diff algorithm work?
The most common diff algorithm (Myers) finds the shortest edit script to transform one text into another based on the Longest Common Subsequence problem. Git uses a variation of this for git diff output.
7Why does my diff show the entire file as changed when only one line changed?
This usually means line endings differ — Windows uses CRLF (\r\n) and Unix/Mac uses LF (\n). When files mix line endings, every line appears different. Enable "Ignore whitespace" to normalise line endings. Inconsistent indentation (tabs vs spaces) causes the same problem.
8How do I ignore whitespace in a diff?
Enable "Ignore whitespace" to strip leading and trailing spaces before comparison. This is useful when comparing code reformatted by a linter where only logical content changed.
9How do I compare JSON with a diff tool?
Paste both JSON objects in the two inputs. For semantic JSON comparison, use the JSON Comparator tool. For raw text diff, this tool shows exactly which characters and lines changed.
10What is the unified diff format?
The unified diff format is the standard output of git diff and Unix diff -u. It shows context lines, additions (+), and removals (-). Patch files in this format can be applied with the patch command.
11How do I compare code changes without Git?
Paste the original code in the left input and modified code in the right. The diff tool shows additions and removals with color highlighting — no Git or command-line tools required.
12What is character-level vs word-level diff?
Line-level diff marks entire lines as changed. Character-level (inline) diff shows exactly which characters within a changed line were added or removed. Enable "Inline char diff" to see this highlighting.
Learn more

Developer Guides

Last updated: May 2026

Feedback for text_diff

Tell us what's working, what's broken, or what you wish we built next — it directly shapes our roadmap.

You make the difference

Good feedback is gold — a rough edge you hit today could be smoother for everyone tomorrow.

  • Feature ideas often jump the queue when lots of you ask.
  • Bug reports with steps get fixed faster — paste URLs or examples if you can.
  • Name and email are optional; we won't use them for anything except replying if needed.

Stay Updated

Get the latest tool updates, new features, and developer tips delivered to your inbox.

What you'll get
  • Product updates & new tools
  • JSON, API & developer tips
  • Unsubscribe anytime — no hassle

Get in touch

Feature ideas, bugs, or a quick thanks — we read every message.