# Idna domain map

`idna-domain-map` · version 1.0.0 · URLs & IP addresses · free, no key needed

Map a domain with the Unicode 17 UTS #46 table, steps 1 and 2 only.

**Use when you need to: apply the uts 46 mapping table · preview idna character mapping · map capital sharp s in a domain.**

## Decide before calling

Read the [versioned contract](/v1/tools/idna-domain-map/versions/1.0.0) and the supported scope below. Reuse `idna-domain-map@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `idna-domain-map@1.0.0` for apply the uts 46 mapping table. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- apply the uts 46 mapping table
- preview idna character mapping
- map capital sharp s in a domain
- domain mapping before punycode
- nfc normalize a domain label
- show transitional idna mapping
- which characters does idna rewrite

## Not supported

- punycode the mapped domain
- reject disallowed characters
- verify dns label length

## Behavior

- Map each code point by Unicode 17.0.0 IdnaMappingTable status. Ignored code points are removed. Disallowed and valid code points stay. Deviation code points use the table mapping only when transitional is true; otherwise they stay. Mapped code points use the table mapping, except U+1E9E CAPITAL SHARP S, which becomes U+0073 U+0073 (ss) when transitional is true and U+00DF when transitional is false (UTS #46 revision 33, section 4 step 1).
- After mapping, normalize with NFC. The host String.normalize and the Mark category check follow the runtime Unicode version; status values come only from the vendored Unicode 17.0.0 table.
- transitional is optional. When the field is omitted, transitional processing is false and the output echoes false. data_version is unicode-17.0.0-uts46-rev33.
- CheckBidi and CheckJoiners are not applied. NV8 and XV8 markers are not an extra rejection. There is no DNS lookup and no URL parse.
- Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity.
- This tool stops after UTS #46 steps 1 and 2. mapped is the string after status mapping and before NFC. normalized is mapped after NFC. Dots stay as separators and are not used to split labels.
- Disallowed characters, STD3 exclusions, hyphens, combining marks, and A-labels are left in place. An A-label is not decoded. An ignored-only domain returns empty mapped and normalized strings.
- No DNS length check runs. The only limit_exceeded case is an input over 253 UTF-8 bytes, and that check happens before mapping and before the lone-surrogate check.

## Input

- `domain` (string, required): min length 1; Domain name, without a scheme or path. Omitted transitional means false.
- `transitional` (boolean, optional): UTS #46 Transitional_Processing. Omission means false.

## Output

- `transitional` (boolean, required)
- `data_version` (constant "unicode-17.0.0-uts46-rev33", required)
- `mapped` (string, required)
- `normalized` (string, required)

## Limits

- max input bytes: 253

## Example

Request input:

```json
{
  "domain": "Bloß.de",
  "transitional": true
}
```

Response:

```json
{
  "result": {
    "mapped": "bloss.de",
    "normalized": "bloss.de",
    "transitional": true,
    "data_version": "unicode-17.0.0-uts46-rev33"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "idna-domain-map",
  "version": "1.0.0",
  "input": {
    "domain": "Bloß.de",
    "transitional": true
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/idna-domain-map/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"domain":"Bloß.de","transitional":true}'
```

The machine-readable contract is at [/v1/tools/idna-domain-map/versions/1.0.0](/v1/tools/idna-domain-map/versions/1.0.0).

### CLI

```sh
node cli.mjs run idna-domain-map 1.0.0 --input input.json --base-url https://computefirst.net
```

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

## Related tools

- [Idna domain to unicode](/tools/idna-domain-to-unicode): Convert a domain to Unicode with UTS #46 ToUnicode and decode A-labels.
- [Idna domain to ascii](/tools/idna-domain-to-ascii): Convert a domain to DNS ASCII with UTS #46 ToASCII, STD3, and DNS lengths.
- [Idna domain diagnose](/tools/idna-domain-diagnose): Validate each dot-separated IDNA2008 label and the 253-octet DNS wire length.
- [Idna label validate](/tools/idna-label-validate): Validate one already-mapped IDNA2008 label for registration or lookup.
- [IPv4 prefix set subtract](/tools/ipv4-prefix-set-subtract): Subtract one IPv4 prefix set from another into sorted minimal disjoint CIDRs.
- [IPv4 in CIDR](/tools/ipv4-in-cidr): Test whether a canonical IPv4 address lies in a CIDR prefix whose host bits are zero.
