Remove hidden Unicode from text
clean_textReturn the text with invisible characters, bidi controls, tag characters and control characters removed and unusual spaces turned into normal spaces. By default ZWJ/ZWNJ/VS16 are kept inside emoji sequences, between letters of joining scripts (Arabic, Persian) and after an Indic virama (keep_joiners=true); strict=true removes them everywhere. Optional: map lookalike letters to Latin (lookalikes) and apply NFKC normalisation (nfkc). Read-only. Same engine as GET /api/clean.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nfkc | No | Apply Unicode NFKC first (fullwidth and math letters → plain). | |
| text | Yes | Text to inspect (up to 2000 UTF-16 code units). | |
| spaces | No | Turn unusual spaces into a normal space. | |
| strict | No | Strict mode: remove every joiner and variation selector, even in emoji and Persian/Indic text (overrides keep_joiners). | |
| lookalikes | No | Map lookalike letters (e.g. Cyrillic а) to Latin. Changes legitimate non-Latin text too. | |
| keep_joiners | No | Keep ZWJ/ZWNJ/VS16 where they are legitimate: emoji ZWJ sequences and VS16 emoji presentation, between letters of joining scripts (Arabic, Persian), and after an Indic virama. Joiners elsewhere are always removed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| notes | No | ||
| length | No | ||
| changed | Yes | ||
| options | No | ||
| removed | Yes | ||
| version | Yes | ||
| joinersKept | No | ||
| lookalikesMapped | No |