Glossary

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 InputPunycode Output
münchen.dexn—mnchen-3ya.de
日本語.jpxn—wgv71a309e.jp
café.comxn—caf-dma.com
Москва.comxn—80adxhks.com

The algorithm:

  1. Separate ASCII and non-ASCII characters
  2. Encode non-ASCII characters using a base-36 numeric representation
  3. 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.

Still Confused? Try It Free.

Set up your first domain forward in under 5 minutes. Free plan includes 5 domains.