Compare two texts, get line-by-line or word-by-word diff with additions, deletions, and unchanged segments.
3 free requests/day without API key
https://text-diff-tawny.vercel.appX-API-Key: your_key (header) or ?key=your_key (query)Get your free key below/api/diffCompare two texts and get a structured diff with additions, deletions, and unchanged segments.
text1stringyesOriginal text to comparetext2stringyesModified text to compare againstmodestringnoDiff mode: "line" or "word". Default: "line"{
"changes": [
{ "type": "equal", "value": "Hello" },
{ "type": "delete", "value": "world" },
{ "type": "insert", "value": "Go" }
],
"stats": {
"additions": 1,
"deletions": 1,
"unchanged": 1,
"identical": false
}
}// 400 — Bad Request
{ "error": "Missing 'text1' and 'text2' fields" }
// 401 — Unauthorized
{ "error": "Invalid API key" }
// 429 — Rate Limited
{ "error": "Daily limit reached. Upgrade your plan." }Get a free API key for 6 requests/day. No credit card required.
X-API-Key: your_key?key=your_keyStart free. Pay only when you need more.