Punycode Encoder & Decoder | Free Online Punycode Conversion Tool

Easily convert between Punycode (xn-- prefixed) and internationalized domain names (IDN).


Example: encode ☃-⌘.com (characters) to Punycode or decode xn----dqo34k.com (Punycode) to characters.

How to Use Punycode Encoder & Decoder

A step-by-step guide to use Punycode conversion tool

1

Choose Conversion Type

Select whether you want to encode regular text to Punycode or decode Punycode back to regular text.

2

Enter Your Text

Type or paste the text you want to convert into the input field.

3

Get Results

The converted text will appear in the result field. You can copy it directly to your clipboard using the copy button.

Frequently Asked Questions

Find answers to common questions about Punycode

Punycode is a way to represent Unicode (UTF-8) characters using only ASCII characters. It's primarily used for internationalized domain names (IDN) to allow domain names with non-ASCII characters (like Chinese, Arabic, or Cyrillic) to be used in DNS systems. For example, the domain "bücher.example.com" becomes "xn--bcher-kva.example.com" in Punycode.
Web browsers and DNS systems require domain names to be in ASCII format. Punycode allows you to use non-ASCII characters in domain names by converting them to an ASCII-compatible format. This is essential for creating and managing internationalized domain names (IDNs).
No, they serve different purposes. URL encoding (percent-encoding) is used to encode characters that are not allowed in URLs, such as spaces or special characters. Punycode, on the other hand, is specifically for converting Unicode domain names to ASCII for DNS systems.

For example:

  • example.com?name=你好 becomes example.com?name=%E4%BD%A0%E5%A5%BD in URL encoding
  • 你好.com becomes xn--6qq79v.com in Punycode
Punycode converts Unicode strings into a limited set of ASCII characters using a specific encoding algorithm. The resulting string always starts with "xn--" to indicate that it's a Punycode-encoded domain name. The conversion process is reversible, meaning you can decode Punycode back to the original Unicode string.

While Punycode is widely supported, there are some limitations:

  • Punycode-encoded domain names are longer than their Unicode equivalents, which can be inconvenient.
  • Some older systems or applications may not fully support Punycode or IDNs.
  • There can be security risks with "homograph attacks" where different Unicode characters look similar but have different meanings.