Encoding · Domains
Punycode & IDN converter.
Convert an internationalised domain name to its xn-- form, or decode one back, one label at a time. Runs in your browser; nothing is sent anywhere.
Input
Result
Enter a domain name and press Convert.
How the conversion works
Per label: a name is split at its dots and each label is converted on its own. A label that has any non-ASCII character is normalised (NFC), lowercased, encoded with the RFC 3492 Punycode algorithm and given the xn-- prefix. An all-ASCII label is left as it is (lowercased). bücher becomes xn--bcher-kva.
Length: each ASCII label may be at most 63 characters (RFC 5891, RFC 1035 section 2.3.4). Emoji and long scripts reach that limit sooner than you might expect.
Dots: the ideographic full stop (U+3002), fullwidth full stop (U+FF0E) and halfwidth ideographic full stop (U+FF61) are treated as label separators, as browsers do.
IDNA2008 and UTS #46 are not the same
IDNA2008 (RFC 5891) is strict: it decides which code points a label may contain and does not map anything, so an uppercase letter or a compatibility character is simply invalid. UTS #46 is the compatibility processing browsers use; it first maps such characters to a valid form and, in its transitional mode, treats a few characters differently from IDNA2008 (the German sharp s is the usual example). The same typed name can therefore give a different xn-- result in a browser than under a strict registry rule.
This tool applies the Punycode algorithm and simple NFC and lowercase folding. It does not carry the IDNA2008 code point tables or the UTS #46 mapping table. The result panel also shows what your own browser produces for the same name, so a difference is visible.
Homograph warning
A label that mixes scripts, such as a Cyrillic а inside otherwise Latin letters, can look identical to a different name. The tool flags a label that mixes scripts, except the usual Han, Hiragana, Katakana and Hangul combinations used in Japanese and Korean. A label written entirely in one script can still be a lookalike of another (whole-script confusable); detecting that needs the UTS #39 confusables data, which this tool does not include, so no warning does not mean safe.
Sources: RFC 3492 (Punycode); RFC 5891 (IDNA2008 protocol); Unicode UTS #46; Unicode UTS #39 (mixed-script detection).
Frequently asked questions
What is Punycode?
A way to write any Unicode string using only letters, digits and hyphens (RFC 3492). Domain names use it, with an xn-- prefix, so international names fit the ASCII-only DNS.
Is the converted name registered or safe to visit?
No. This converts text only. It does not check DNS, registry policy or whether a name is malicious.
Why does my browser show a different result?
Browsers apply UTS #46 mapping before encoding. Characters such as uppercase letters or compatibility forms may be mapped, so the output can differ from a plain Punycode conversion. Both results are shown.
Can I check the converted name afterwards?
Yes. Paste the ASCII result into the Hostname & FQDN Validator to check its label and length rules.
Worked example: three internationalised domain names
Each label that contains a non-ASCII character is normalised, lowercased, encoded with Punycode and prefixed with xn--. ASCII labels are left as they are.
| Unicode name | ASCII (xn--) form |
|---|---|
| bücher.example | xn--bcher-kva.example |
| münchen.de | xn--mnchen-3ya.de |
| 日本語.jp | xn--wgv71a119e.jp |
Decoding works in reverse: xn--bcher-kva.example becomes bücher.example. The ASCII form is what DNS and TLS certificates use.
French, Cyrillic and a lookalike
| Label (Unicode) | ASCII label | ASCII length | Within the 63 limit |
|---|---|---|---|
| montréal | xn--montral-fya | 15 | Yes |
| français | xn--franais-xxa | 15 | Yes |
| tête-à-tête | xn--tte--tte-2ya0hg | 19 | Yes |
| мосты | xn--l1aeje9b | 12 | Yes |
| аpple | xn--pple-43d | 12 | Yes |
| apple | apple | 5 | Yes |
What the table is. Each row is this page’s own conversion of the first label (the part before .example). Latin letters with accents, such as the é in montréal or the ç in français, are encoded after a hyphen: the letters that are plain ASCII stay in order and a short code records where the accents go.
Why it matters. The Cyrillic а in the fifth row looks the same as a Latin a, yet the label becomes xn--pple-43d while the real apple stays apple. That visible difference in the ASCII form is how you catch a lookalike, and the tool shows a mixed-script warning for it.
How many characters fit in 63
| Characters in a Han and Hiragana label | ASCII label length | Within the 63 limit |
|---|---|---|
| 10 | 37 | Yes |
| 18 | 61 | Yes |
| 19 | 64 | No |
What the numbers are. Each row is the same sample label cut to that many characters and run through this converter. Every character after the first costs about three ASCII characters here, so 18 characters give 61 and 19 give 64, one past the limit.
What they do not show. The count depends on which characters you use, because Punycode packs similar characters more tightly; a label of Latin letters with one accent stays close to its original length. The limit applies to each label separately, and this tool checks the 63-character limit only for each label.
What to do. If a name you want is over the limit, shorten that label rather than the whole name. Always check the final ASCII form here before you enter it in a registrar form, and compare it with what the registrar shows back.
Conversion only
This tool converts and warns; it does not confirm that a name is valid under IDNA2008, allowed by a registry, registered, or free of lookalike risk.