# Text NFD

`text-nfd` · version 1.0.0 · Text · free, no key needed

Normalize Unicode text to NFD (canonical decomposition).

**Use when you need to: text nfd · unicode nfd · canonical decomposition.**

## Supported

- text nfd
- unicode nfd
- canonical decomposition

## Not supported

- NFKD
- NFKC
- NFC
- locale case fold
- case folding
- compatibility decomposition
- read files

## Behavior

- text is a Unicode string of at most 250 KiB UTF-8.
- The output text is Unicode Normalization Form D (canonical decomposition, combining marks in canonical order).
- No case folding, locale conversion, or compatibility (NFKC/NFKD) mapping is performed.
- A leading U+FEFF is left in place; this tool does not strip a byte-order mark.
- If NFD expands the UTF-8 byte length above 250 KiB, the input is rejected.
- NFC of NFD of s equals NFC of s.

## Input

- `text` (string, required): max length 256000

## Output

- `text` (string, required): max length 256000

## Limits

- max input bytes: 256000
- max output bytes: 256000

## Example

Request input:

```json
{
  "text": "café"
}
```

Response:

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

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "text-nfd",
  "version": "1.0.0",
  "input": {
    "text": "café"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/text-nfd/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"café"}'
```

The machine-readable contract is at [/v1/tools/text-nfd/versions/1.0.0](/v1/tools/text-nfd/versions/1.0.0).

### CLI

```sh
node cli.mjs run text-nfd 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Text NFC](/tools/text-nfc): Normalize Unicode text to NFC (canonical composition).
- [Text slice codepoints](/tools/text-slice-codepoints): Slice a string by Unicode code-point indexes, not UTF-16 code units.
- [Text unicode normalization check](/tools/text-unicode-normalization-check): Check if a text string is in various Unicode normalization forms (NFC, NFD, NFKC, NFKD).
- [Text apply unified patch](/tools/text-apply-unified-patch): Apply a one-file unified patch to text at original line addresses with exact hunk matches.
- [Text conflict parse](/tools/text-conflict-parse): Parse merge or diff3 conflict-marker text into ordered text and conflict parts.
- [Text conflict render](/tools/text-conflict-render): Render text and conflict parts as merge or diff3 conflict-marker text.
