Idna domain to unicode
idna-domain-to-unicode · version 1.0.0 · URLs & IP addresses · free, no key needed
Convert a domain to Unicode with UTS #46 ToUnicode and decode A-labels.
Use when you need to: convert punycode domain to unicode · uts 46 tounicode · a-label back to unicode letters.
Decide before calling
Read the versioned contract and the supported scope below. Reuse idna-domain-to-unicode@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-to-unicode@1.0.0 for convert punycode domain to unicode. 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
- convert punycode domain to unicode
- uts 46 tounicode
- a-label back to unicode letters
- decode an xn domain
- unicode display form of a domain
- idna domain to unicode letters
- show the unicode labels of a domain
Not supported
- look up the domain in dns
- convert a url path to unicode
- enforce the 253 octet dns limit
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.
- ToUnicode (section 4.3) uses the same Map, NFC, and Validate steps as ToASCII, including STD3 and CheckHyphens, then returns the Unicode labels. It does not punycode them and it does not apply VerifyDnsLength.
- An xn-- label is decoded and validated under nontransitional rules. It is not remapped, so transitional true does not turn xn--fa-hia.de into fass.de. A trailing empty root label is kept. A label longer than 63 octets can still succeed.
- The first failure wins: not_nfc, hyphen, combining_mark, disallowed, std3, punycode, empty_label. Those are invalid_input with details.reason. This tool does not return domain_too_long or label_too_long.
- Input longer than 253 UTF-16 code units, or whose UTF-8 form exceeds 253 bytes, is limit_exceeded 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)unicode(string, required): min length 1
Limits
- max input bytes: 253
Example
Request input:
{
"domain": "xn--bcher-kva.de"
}
Response:
{
"result": {
"unicode": "bücher.de",
"transitional": false,
"data_version": "unicode-17.0.0-uts46-rev33"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "idna-domain-to-unicode",
"version": "1.0.0",
"input": {
"domain": "xn--bcher-kva.de"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/idna-domain-to-unicode/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"domain":"xn--bcher-kva.de"}'
The machine-readable contract is at /v1/tools/idna-domain-to-unicode/versions/1.0.0.
CLI
node cli.mjs run idna-domain-to-unicode 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Idna domain to ascii: Convert a domain to DNS ASCII with UTS #46 ToASCII, STD3, and DNS lengths.
- Idna domain map: Map a domain with the Unicode 17 UTS #46 table, steps 1 and 2 only.
- Idna label validate: Validate one already-mapped IDNA2008 label for registration or lookup.
- Idna domain diagnose: Validate each dot-separated IDNA2008 label and the 253-octet DNS wire length.
- IPv4 prefix set subtract: Subtract one IPv4 prefix set from another into sorted minimal disjoint CIDRs.
- IPv4 mask convert: Convert between an IPv4 prefix length, dotted subnet netmask, and dotted wildcard (host) mask.