Encoding / Decoding

Punycode Encode / Decode

Convert domain names to/from Punycode (IDN).

Unicode Domain
Punycode Domain

What is Punycode?

Punycode is an encoding used to represent Unicode characters in ASCII for internationalized domain names (IDN). It converts non-ASCII domain names to ASCII-compatible encoding.

Use Cases

  • Internationalized domain names
  • Email address encoding
  • URL handling with non-ASCII characters

Frequently Asked Questions

Why do some web addresses start with xn--?
That is the marker for internationalized domain names: the DNS only supports ASCII, so Chinese, Japanese, and other non-ASCII domains are stored and resolved in an xn-- encoded form. For example, the Chinese domain equivalent of example.com becomes xn--fiq228c.com. Browsers display the original script but request the punycode form.
Which form should I use when registering a domain?
Registrars usually accept both, but WHOIS records and DNS configuration store the xn-- encoded form. When setting up DNS records, CDN rules, or TLS certificates, always confirm whether a system expects the encoded or Unicode form — mixing them is a classic source of outages.
Are there security risks with punycode?
Yes — homograph attacks: registering look-alike domains by substituting Cyrillic а for Latin a. Modern browsers show the raw punycode for high-risk combinations. Pasting any xn-- domain into this decoder is a quick way to verify its true spelling.