What is Punycode / IDN?

Punycode is a encoding syntax by which a Unicode (UTF-8) string of characters can be translated into the basic ASCII-characters permitted in network host names. Punycode is used for internationalized domain names, in short IDN or IDNA (Internationalizing Domain Names in Applications).

For example, when you would type café.com in your browser, your browser (which is the IDNA-enabled application) first converts the string to punycode "xn--caf-dma.com", because the character 'é' is not allowed in regular domain names. Punycode domains won't work in older browsers.

Find more detailed info in the specification RFC 3492.

Convert Unicode to Punycode and vice versa

Click to add some examples: mañana.com, bücher.com, café.com.

Encode normal domain name (Unicode / UTF-8) to Punycode:

Decode Punycode to normal domain (Unicode):

 
Conversion is provided as is and without any liability. Use at your own risk. Convert both ways to double-check your string. Download PHP source code here.