A free edge API by formatho.com, privacy-first developer tools.
Free, no signup, runs entirely in your browser — your data never leaves your device.
# 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"
| Param | Default | Description |
|---|---|---|
a | required | Original text (aliases on POST: original, text1, left). |
b | required | Modified text (aliases on POST: modified, text2, right). |
context | 3 | Unchanged context lines around each hunk (0–10). |
ignore_ws | false | Compare lines with whitespace collapsed/trimmed (changes still shown with original text). |
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.
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.
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.
Browse every free Formatho Worker tool on the Formatho Tools index.