Clean and normalize text
clean_textNormalizes text offline: collapse repeated spaces, remove extra whitespace and invisible chars, unify line endings. Optionally collapse blank lines, convert smart punctuation to ASCII, remove URLs.
Instructions
Normalize messy text: collapse repeated spaces, strip trailing whitespace and invisible characters, unify line endings, and optionally collapse blank lines, convert smart punctuation to ASCII, or remove URLs. Runs entirely offline — nothing is uploaded and no network call is made.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to clean. | |
| removeUrls | No | Strip every http/https URL from the text. Note: this removes ALL URLs — the server is offline and cannot tell a working link from a dead one. | |
| normalizeQuotes | No | Replace curly quotes, en/em dashes and ellipsis characters with their ASCII equivalents. | |
| collapseBlankLines | No | Collapse runs of two or more blank lines into a single blank line. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The cleaned text. | |
| after | Yes | ||
| before | Yes | ||
| changed | Yes | False when the input was already clean. | |
| removedUrls | Yes | URLs stripped, when removeUrls was set. |