What Is Punycode

Learn how Punycode lets internationalized domain names work with ASCII-only DNS, and how to convert them.

4 min read Updated Jun 2026

Quick Answer

Punycode lets a domain name written in any language travel through the internet's address system, which only understands plain ASCII. A name like münchen.de is stored and transmitted as xn--mnchen-3ya.de, then shown back to you as the original.

Try the Punycode Converter →

Why Punycode Exists

DNS, the system that turns domain names into addresses, was designed decades ago to handle only letters A–Z, digits, and hyphens. That left out most of the world's writing systems. Rather than rebuild DNS, the internet added a translation layer: encode the Unicode name into that limited ASCII alphabet, and decode it for display. That encoding is Punycode.

Punycode Applies Per Label, Not the Whole URL

A domain is a series of labels separated by dots, and Punycode applies per label, not the whole URL. This idn converter changes each label on its own and only touches the ones that actually contain non-ASCII characters. In café.example.com only café needs encoding, so the result is xn--caf-dma.example.com. The example and com labels are already ASCII and pass through untouched. Run unicode to punycode in one direction, or punycode to unicode to decode, and the tool handles each label independently.

Punycode And Lookalike Domains

Because many alphabets contain characters that look almost identical to Latin letters, a domain can be registered that is visually indistinguishable from a trusted one, a homograph attack. Decoding a suspicious xn-- domain with an xn-- converter reveals the actual characters behind it, which is a quick way to tell a genuine site from an impostor.

Punycode vs UTF-8

Punycode vs UTF-8 is a common point of confusion. UTF-8 is how Unicode text is stored as bytes almost everywhere, including the visible part of a web page and its path. Punycode is a narrower scheme used only for the hostname, where the DNS alphabet forbids raw UTF-8. So a full address can hold UTF-8 in its path while its domain labels are Punycode. They solve different problems: UTF-8 encodes any text as bytes, while Punycode squeezes one domain label into the letters, digits, and hyphens that DNS allows.

Examples

A German domain. For example, input: münchen.de. Output: xn--mnchen-3ya.de. Only the first label changes; the de suffix is already ASCII.

Checking a suspicious link. For example, an email links to xn--pple-43d.com. Decode it and the label reads аpple with a Cyrillic first letter, exposing a lookalike of apple.com.

An emoji domain. For example, input: 💩.la. Output: xn--ls8h.la, showing that any Unicode label, not just accented Latin, encodes the same way.

Common Mistakes

You May Also Need

You may also need

Next steps

Alternatives

Continue Learning