Diff Checker — Free & Private Text Comparison API

A free edge API by formatho.com, privacy-first developer tools.

Open the full browser tool →

Free, no signup, runs entirely in your browser — your data never leaves your device.

🔓 Free 🔒 Zero tracking 🚫 No data collection ⚡ Edge-fast

Usage

# GET — quick line diff:
curl "https://diff-checker-formatho.filesformatho.workers.dev/api?a=hello%20world&b=hello%20there"

# POST — recommended for larger inputs (JSON body):
curl -X POST https://diff-checker-formatho.filesformatho.workers.dev/api \
  -H 'Content-Type: application/json' \
  -d '{"a":"line 1\nline 2\nline 3","b":"line 1\nchanged\nline 3","context":3}'

# Ignore whitespace-only changes:
curl ".../api?a=code%201%20%20&b=code%201&ignore_ws=1"

Parameters

ParamDefaultDescription
arequiredOriginal text (aliases on POST: original, text1, left).
brequiredModified text (aliases on POST: modified, text2, right).
context3Unchanged context lines around each hunk (0–10).
ignore_wsfalseCompare lines with whitespace collapsed/trimmed (changes still shown with original text).

What you get

One call returns a JSON diff built with the Myers algorithm (the same approach Git uses): per-line add / remove / context ops grouped into unified-diff hunks with line numbers, a ready-to-print unified_diff string, and a summary (added, removed, unchanged, change_ratio). identical is true when the texts match line-for-line.

Live response: /api endpoint.

Privacy-first: inputs are diffed in-memory on Cloudflare's edge and discarded with the response. No logs, no analytics, no cookies, no data collection. Inputs never touch a disk.

What it handles

CRLF and LF line endings, empty inputs, files without trailing newlines (reported as trailing_newline_mismatch), large edits, and whole-file rewrites up to `800 changed lines` per diff. Limits per request: 300,000 chars and 4,000 lines per side (Cloudflare free-plan CPU/memory) — bigger diffs belong in the browser tool below.

Full browser tool

Prefer a side-by-side UI with syntax highlighting and unlimited size? Use the complete client-side version — your files never leave your machine: Diff Checker on formatho.com.

All Formatho edge APIs

Browse every free Formatho Worker tool on the Formatho Tools index.