> international | domains | unicode <
// Punycode - International domain names with Unicode to ASCII encoding
Unicode Support
Encode any Unicode character including emojis and special scripts.
DNS Compatible
Creates ASCII-only domain names that work with DNS infrastructure.
RFC 3492
Official IETF standard for internationalized domain names (IDN).
>> technical info
How Punycode Works:
Punycode is a bootstring encoding that converts Unicode strings to ASCII. It separates ASCII characters from non-ASCII, then encodes the positions and values of Unicode characters using only ASCII.
Example:
"münchen" → xn--mnchen-3ya
Why Use Punycode:
- >International domain names (IDN)
- >Unicode in DNS systems
- >Email addresses with Unicode
- >Backward compatibility
- >Cross-system compatibility
>> frequently asked questions
What is Punycode?
Punycode is an encoding syntax used to convert Unicode characters to ASCII for use in Internationalized Domain Names (IDN). It allows domain names to contain non-ASCII characters.
Why does Punycode use 'xn--' prefix?
The 'xn--' prefix identifies a domain label as Punycode-encoded. It stands for 'ASCII Compatible Encoding' and prevents confusion with regular ASCII domain names.
Can I use emojis in domain names?
Yes, emojis can be encoded using Punycode. For example, 😊.com becomes xn--e28h.com. However, not all registrars support emoji domains.
Is Punycode only for domains?
While primarily designed for domain names, Punycode can encode any Unicode text to ASCII. It's most commonly used for IDN and internationalized email addresses.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Compare both ASCII and Unicode forms of IDN labels, including Chinese, accents and emoji.
- Comparison reference
- Node.js node:url domainToASCII / domainToUnicode.
- Verification scope
- The listed labels do not establish full UTS #46 or domain-registration compliance.
Test source and cases (select a file to read it)
-
legacy-reliability.test.js
- Punycode: IDN labels agree with Node URL domainToASCII and domainToUnicode
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.