If you have ever looked up a domain and seen a string like xn--80ak6aa92e.com in WHOIS, a TLS certificate, or your browser's address bar, you have met Punycode. It is the encoding that lets domain names contain non-ASCII characters, such as accented letters, Cyrillic, Arabic, or Chinese, while the underlying DNS still carries only plain ASCII. This guide explains what an internationalized domain name is, how Punycode turns Unicode into those xn-- labels, where each form shows up, and the homograph risk you need to watch for.
What an internationalized domain name is
DNS, at the protocol level, was designed for a narrow character set: the letters a to z, the digits 0 to 9, and the hyphen. This is often called the LDH rule (letters, digits, hyphen). An internationalized domain name, or IDN, is a domain that a person writes using characters outside that set, for example a name in German with an umlaut or a name written entirely in Devanagari. Because the wire format of DNS cannot carry those characters directly, IDNs are handled by a client-side process defined in the IDNA standards (IDNA2008, RFC 5890 through 5894, as of November 2026). The human-readable Unicode form is called the U-label, and the encoded ASCII form that actually travels through DNS is called the A-label.
How Punycode encodes a label
Punycode, specified in RFC 3492, is the algorithm that converts a Unicode string into a compact ASCII string using only LDH characters. It works one label at a time, meaning each piece between the dots is encoded separately. The algorithm first copies any plain ASCII characters that are already present, then appends a special sequence that describes the non-ASCII characters and exactly where they belong, so the original Unicode can be reconstructed without loss.
Every Punycode-encoded label is marked with the ASCII Compatible Encoding prefix xn--. When a resolver, registrar, or browser sees a label beginning with xn--, it knows the rest is Punycode and can decode it back to Unicode for display. A label that is already pure ASCII is never given the prefix, so example.com stays exactly as it is.
A worked example, U-label to A-label
The clearest way to see the mapping is to put the two forms side by side. Each row shows what a person types or sees and the ASCII that DNS actually stores and queries.
| U-label (Unicode) | A-label (Punycode) | Note |
|---|---|---|
| bucher.de with umlaut u | xn--bcher-kva.de | One accented letter, ASCII kept inline |
| Cyrillic spelling of "example" | xn--80ak6aa92e.com | Whole label is non-ASCII |
| koln with umlaut o | xn--kln-sna | Single label, no TLD shown |
| plain example | example | No prefix, already ASCII |
Notice that only the individual label is encoded. The top-level domain, such as .com, is encoded on its own if it too is internationalized, otherwise it stays as ASCII. You never Punycode the dots.
Where you see each form
Different tools choose to show you the U-label or the A-label, and knowing which is which saves confusion. Browsers decide per TLD whether to display the pretty Unicode or the raw xn-- form, based on the script-mixing rules of the registry, and will fall back to showing Punycode when a name looks risky. WHOIS and registrar control panels frequently store and display the A-label because that is the canonical registered string. TLS certificates list the A-label in the subject alternative name field, since certificate fields are ASCII. Email addresses add their own wrinkle: the domain part can be an IDN, but internationalized local parts (the portion before the at sign) depend on separate SMTP support that is still uneven.
The homograph and spoofing risk
The feature that makes IDNs useful also makes them dangerous. Many Unicode characters look identical or nearly identical to ASCII letters. A Cyrillic "a" renders the same as a Latin "a" in most fonts, so an attacker can register a name that is visually indistinguishable from a trusted brand but resolves somewhere else entirely. This is called a homograph or homoglyph attack. Registries and browsers defend against it in two main ways. Registries apply script-mixing and allowed-character policies so that a single label cannot freely combine, say, Latin and Cyrillic. Browsers apply their own display heuristics and will show the bare xn-- form rather than the deceptive Unicode when a name violates those heuristics, which is a visible warning sign worth respecting.
How to convert and check an IDN
When you need to confirm what an xn-- string really decodes to, or encode a Unicode name yourself, work through these steps.
- Isolate a single label. Split the name on the dots and convert each piece separately, because Punycode never spans a dot.
- Decode with a trusted converter. Use a local library (most languages ship an IDNA or Punycode module) or an offline tool so you are not pasting sensitive names into an unknown site.
- Read the decoded Unicode carefully. Watch for mixed scripts, for example a name that is mostly Latin with one Cyrillic character hiding inside.
- Compare against the brand you expected. If the decoded form looks like a known name but the scripts are mixed, treat it as suspicious.
- Verify the registration. Look up the A-label in a WHOIS search to see the real registrar, creation date, and ownership rather than trusting the rendered text.
Practical guidance for owners and auditors
If you own a brand, the standard defensive move is to register the obvious homograph variants of your name alongside the real one. Keep an inventory of your legitimate IDNs in both U-label and A-label form, because your certificate and DNS tooling report the A-label while your marketing team thinks in the U-label. When you audit a domain that arrives in xn-- form, always decode it before judging it, and remember the string is canonical: transferring, renewing, or securing the name all operate on the A-label, the same reality covered in our guide to transferring a domain between registrars.
Is an IDN a different domain from its Punycode form?
No. The U-label and the A-label are two representations of the same registered name. DNS only ever stores and queries the A-label, and the Unicode form is produced for display by decoding it.
Why does my browser sometimes show xn-- instead of the pretty name?
Browsers fall back to the raw Punycode when a label mixes scripts or otherwise trips their anti-spoofing heuristics. Seeing the xn-- form unexpectedly is a signal that the name may be a homograph of something else.
Can the top-level domain itself be internationalized?
Yes. There are many IDN TLDs, and each is encoded as its own Punycode label with the xn-- prefix. The label and the TLD are encoded independently, and the dot between them is never encoded.
Do TLS certificates support IDNs?
Certificates carry the A-label in the subject alternative name entries, because those fields are ASCII. A certificate for an IDN site therefore lists the xn-- form, which is correct and will validate for the matching Unicode name.
Is email to an IDN address reliable?
The domain part of an address can be an IDN and is handled through the same A-label encoding. Fully internationalized addresses, where the part before the at sign is also non-ASCII, rely on newer SMTP extensions whose support across providers is still inconsistent as of November 2026.
Internationalized names let DNS speak every language while the protocol underneath stays simple ASCII, but the visual ambiguity is a real attack surface. Decode before you trust, and confirm anything suspicious against the registration record.