Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Text Cleaner API

Clean pasted text: strip HTML to plain text, straighten smart quotes, plain dashes and ellipses, remove emoji or non-ASCII characters, Unicode-normalise and fix line endings.

POST /api/v1/tools/text-cleanerMCP text_cleanerText & Writing

Clean messy text in one go: strip HTML tags, straighten smart quotes and dashes, remove emoji or non-ASCII characters, normalise Unicode and fix mixed line endings.

Input

Send these as a JSON object. Unknown fields are rejected.

input
The text to clean. (string, required)
stripHtml
Remove HTML tags, comments, scripts and styles, and decode common entities (regex-based; nothing is rendered). (boolean, default false)
smartQuotes
Curly quotes and primes to straight ' and ". (boolean, default true)
dashes
En dashes, em dashes, minus signs and other dashes to a plain hyphen. (boolean, default false)
ellipsis
The single ellipsis character … to three full stops. (boolean, default true)
removeEmoji
Remove emoji. (boolean, default false)
removeNonAscii
Remove characters outside ASCII; accented letters become their plain forms first. (boolean, default false)
normalize
Unicode normalisation form. (string, one of none, NFC, NFKC, default "none")
lineEndings
keep, lf (Unix \n) or crlf (Windows \r\n). (string, one of keep, lf, crlf, default "keep")
curl https://pithlab.com/api/v1/tools/text-cleaner \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"input":"<p>“Smart” quotes — and more…</p>","stripHtml":true,"dashes":true}'
Example response
{
  "ok": true,
  "result": {
    "output": "“Smart” quotes - and more…"
  }
}