Text Diff / Compare

Paste two texts to find and highlight every difference. Character-level precision, side-by-side and inline views.

100% Client-SideNothing Sent to Server
Original Old
Modified New

Need Diff in Your App?

Use our Transform API to compare texts programmatically. JSON response with structured diffs, additions, deletions, and change counts.

curl https://agent-gateway-kappa.vercel.app/v1/agent-transform/api/diff \ -H "Content-Type: application/json" \ -d '{"original":"hello world","modified":"hello there"}'
Get Free API Key Try in Playground

How It Works

Myers Diff Algorithm

Uses the classic Myers diff algorithm to find the minimum edit distance between two texts. Produces optimal, human-readable diffs.

Character-Level Highlighting

Within changed lines, individual characters are highlighted to show exactly what changed — not just which lines differ.

Three View Modes

Inline shows changes sequentially. Side by Side shows old and new in parallel. Unified shows the standard unified diff format.

100% Private

Everything runs in your browser. Your text is never sent to any server. Works offline after the page loads.

Keyboard Shortcuts

Compare

Ctrl+Enter — Run diff comparison

Swap

Ctrl+Shift+S — Swap original and modified

Clear

Ctrl+Shift+X — Clear both text areas