Unicode Domain to ASCII
Normalize a Unicode domain using WHATWG URL IDNA processing and return its ASCII hostname without performing DNS lookup.
Description
Internationalized domain names use ASCII labels for URL host serialization.
Internationalized domain names use ASCII labels for URL host serialization. WHATWG IDNA processing applies more normalization than merely encoding every non-ASCII character.1
Normalize a Unicode domain using WHATWG URL IDNA processing and return its ASCII hostname without performing DNS lookup.
When to use Unicode Domain to ASCII
Use this tool to normalize a Unicode domain using WHATWG URL IDNA processing and return its ASCII hostname without performing DNS lookup.
Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
How to use Unicode Domain to ASCII and understand its results
- Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
- Enter domain using the field table and calculation rules, then run the tool.
- Read domain. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| domain | Unicode domain name without URL delimiters. | string; maximum length: 1000000 | Required |
Enter only a nonempty domain name without whitespace or URL delimiters. The tool wraps it in an HTTPS URL, uses host IDNA normalization and returns the ASCII hostname. Parser failures and normalized IPv4 addresses are rejected.
ASCII domain=hostname of WHATWG_URL('https://'+domain+'/') Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| domain | Normalized ASCII domain name. | string; maximum length: 1000000 |
{
"input": {
"domain": "Bücher.example"
},
"output": {
"domain": "xn--bcher-kva.example"
}
} Limitations and assumptions
No DNS lookup, registration check or confusable analysis occurs. This is domain normalization rather than a general arbitrary-string Punycode encoder; output may normalize case or label forms.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Punycode Domain Decoder: Decode xn-- domain labels using RFC 3492 without claiming DNS registration or Unicode confusable safety. For a complementary task, use URL Hostname: Extract the hostname of an absolute URL using the WHATWG URL parser, including its normalization rules.
References
-
Unicode Domain to ASCII — tool.io
Similar or alternative tools
- Punycode Domain Decoder
Decode xn-- domain labels using RFC 3492 without claiming DNS registration or Unicode confusable safety.
- URL Hostname
Extract the hostname of an absolute URL using the WHATWG URL parser, including its normalization rules.