Convert internationalized domain names (IDN) between Unicode and Punycode. Encode domains with non-ASCII characters to their xn-- representation, or decode Punycode domains back to readable Unicode. Uses a pure JavaScript implementation of the RFC 3492 bootstring algorithm — no data leaves your browser.
Enter an internationalized domain name to encode it to Punycode.
Enter a Punycode domain name to decode it back to Unicode.
Punycode is defined in RFC 3492 and is the encoding used by Internationalized Domain Names in Applications (IDNA). It converts Unicode strings into the limited ASCII character set allowed in DNS labels (a-z, 0-9, and hyphens).
The algorithm works by first separating the basic ASCII characters from non-ASCII code points. The basic characters are copied directly, followed by a delimiter (-). The non-ASCII code points are then encoded as a series of variable-length integers using a generalized base-36 encoding with adaptive bias.
For domain names, each label (part between dots) is processed individually. Labels containing non-ASCII characters are prefixed with xn-- to signal that they are Punycode-encoded. Labels that are already pure ASCII are left unchanged.
Punycode is an encoding syntax defined in RFC 3492 that represents Unicode strings using only ASCII characters. It is primarily used to encode internationalized domain names (IDN) so they can work within the ASCII-only Domain Name System. For example, münchen.de becomes xn--mnchen-3ya.de.
The xn-- prefix is the ACE (ASCII Compatible Encoding) prefix specified by the IDNA standard. It signals to DNS resolvers and applications that the domain label is Punycode-encoded and should be decoded to display the original Unicode text to the user.
The Domain Name System was designed to work only with ASCII characters (letters a-z, digits 0-9, and hyphens). Punycode bridges this limitation by encoding Unicode characters into ASCII, allowing people to register and use domain names in scripts such as Arabic, Chinese, Cyrillic, Devanagari, and many more.
Yes. All encoding and decoding is performed entirely in your browser using a pure JavaScript implementation of the RFC 3492 bootstring algorithm. No data is sent to any server.