# Unicode normaliser

Normalise text to NFC, NFD, NFKC or NFKD, and optionally strip accents or invisible characters.

- Endpoint: `POST https://setget.net/v1/tools/unicode-normalize` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `unicode-normalize`
- Page: https://setget.net/tools/unicode-normalize

## Inputs

- `text` (required, string): The text to normalise.
- `form` (optional, string, one of `NFC`, `NFD`, `NFKC`, `NFKD`, default `"NFC"`): Normal form. NFC is the usual choice; the K forms also replace look-alike variants such as "ﬁ" and full-width letters.
- `strip_accents` (optional, boolean, default `false`): Remove accents and other marks from letters.
- `strip_control` (optional, boolean, default `false`): Remove zero-width, text-direction and control characters. Tabs and line breaks stay.

## Example 1

```json
{"input":{"text":"café"}}
```

Result:

```json
{"text":"café","changed":true,"characters_before":5,"characters_after":4}
```

## Example 2: Removing accents

```json
{"input":{"text":"Crème brûlée","strip_accents":true}}
```

Result:

```json
{"text":"Creme brulee","changed":true,"characters_before":12,"characters_after":12}
```

## Example 3: Removing zero-width characters

```json
{"input":{"text":"a​b﻿","strip_control":true}}
```

Result:

```json
{"text":"ab","changed":true,"characters_before":4,"characters_after":2}
```

**Which form should I use?** NFC for storing and comparing text. NFKC when look-alike variants (full-width letters, ligatures, superscripts) should become ordinary characters.

**Why do two strings look the same but compare as different?** One may use a single accented character and the other a letter followed by a combining accent. Normalising both to the same form fixes that.

**Can strip_control change emoji?** Yes. Emoji such as family groups are joined by an invisible zero-width joiner, so removing it splits them into separate emoji.
