Unicode normaliser

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

Input

The text to normalise.
Normal form. NFC is the usual choice; the K forms also replace look-alike variants such as "fi" and full-width letters.
Remove accents and other marks from letters.
Remove zero-width, text-direction and control characters. Tabs and line breaks stay.

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/unicode-normalize \
  -H 'Content-Type: application/json' \
  -d '{"input":{"text":"café"}}'
import json, urllib.request

body = {'input': {'text': 'café'}}
request = urllib.request.Request("https://setget.net/v1/tools/unicode-normalize", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/unicode-normalize", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"text":"café"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "unicode-normalize",
  "input": {
    "text": "café"
  }
}
{
  "input": {
    "text": "café"
  }
}

Endpoint: POST /v1/tools/unicode-normalize. Over MCP: run_tool with slug: "unicode-normalize". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
text string yes The text to normalise.
form string no Normal form. NFC is the usual choice; the K forms also replace look-alike variants such as "fi" and full-width letters. One of: NFC, NFD, NFKC, NFKD. Default: "NFC".
strip_accents boolean no Remove accents and other marks from letters. Default: false.
strip_control boolean no Remove zero-width, text-direction and control characters. Tabs and line breaks stay. Default: false.

Examples

Input
{
  "text": "café"
}
Result
{
  "text": "café",
  "changed": true,
  "characters_before": 5,
  "characters_after": 4
}

Removing accents

Input
{
  "text": "Crème brûlée",
  "strip_accents": true
}
Result
{
  "text": "Creme brulee",
  "changed": true,
  "characters_before": 12,
  "characters_after": 12
}

Removing zero-width characters

Input
{
  "text": "a​b",
  "strip_control": true
}
Result
{
  "text": "ab",
  "changed": true,
  "characters_before": 4,
  "characters_after": 2
}

Questions

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.