What Is Punycode?
Punycode is an encoding system that converts internationalized domain names (IDNs) containing non-ASCII characters into an ASCII-compatible format that DNS can process. It uses the 'xn--' prefix.
Why It Matters
DNS infrastructure was designed for ASCII characters only. Punycode bridges the gap between what users type (international characters) and what DNS can process (ASCII-only strings like letters, numbers, and hyphens).
How Punycode Works
The encoding follows the xn-- prefix convention:
| IDN Input | Punycode Output |
|---|---|
| münchen.de | xn—mnchen-3ya.de |
| 日本語.jp | xn—wgv71a309e.jp |
| café.com | xn—caf-dma.com |
| Москва.com | xn—80adxhks.com |
The algorithm:
- Separate ASCII and non-ASCII characters
- Encode non-ASCII characters using a base-36 numeric representation
- Append the encoded characters after
xn--
Punycode in DNS Records
When setting up DNS for an internationalized domain, you’ll use the Punycode version:
xn--caf-dma.com. A 192.0.2.1
Most registrar dashboards automatically convert IDNs to Punycode in their DNS management interfaces.
Related Terms
Frequently
asked questions
Use an online Punycode converter, or let your browser and DNS handle it automatically. When you type an IDN, the browser converts to Punycode before making the DNS request.
Yes. Enter the Punycode version (xn--...) when setting up DNS records. Forwarding, HTTPS certificates, and redirects all work normally with Punycode-encoded domains.
Still Confused? Try It Free.
Set up your first domain forward in under 5 minutes. Free plan includes 5 domains.