Type a domain in your own language and it just works. Behind that simple experience, the name exists in two different forms, and your browser quietly chooses which one to show you. Sometimes you see the readable name you typed. Sometimes, on a similar name, you see a strange string starting with xn-- and wonder what broke.
Nothing broke. This guide explains the two representations, Unicode and punycode, how the conversion between them works, and which form a browser displays and why. You can move between the two forms yourself with the free Punycode Converter on Ovatly.
Contents
- Quick answer
- One name, two representations
- How the conversion works: per label, both directions
- What the browser actually shows
- How to convert a domain, step by step
- Worked examples: reading the pairs in both directions
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Unicode is the form people read and type; punycode is the ASCII form, starting with xn--, that DNS actually carries. The conversion runs per label under RFC 3492, in both directions, and plain ASCII labels pass through unchanged. Your browser normally shows the Unicode form, and shows the xn-- form for some domains as a safety display, so a lookalike spoof stays visible instead of rendering as a trusted brand. The Punycode Converter is your window between the two forms whenever you need to see the other side.
One name, two representations
A domain name with non-ASCII characters, such as a German umlaut or Japanese kana, is called an internationalized domain name. People read and type it in Unicode, the character system that covers the world's scripts. That is the form on a business card, in an advert, and in the address bar on an ordinary day.
DNS, however, only carries ASCII letters, digits and hyphens. It has no way to transport an umlaut. So underneath the readable name sits a second representation: the same label encoded into ASCII, prefixed with xn-- so systems can recognise it as an encoded label and decode it back. Neither form is the real name in isolation. They are two spellings of one name, one for people and one for the machinery.
How the conversion works: per label, both directions
Punycode, defined by RFC 3492, encodes one label at a time. A label is a single part of a domain, the text between two dots or between the start and the first dot. Each label is converted separately: a label containing non-ASCII characters becomes an xn-- label, and a plain ASCII label passes through unchanged, exactly as written.
The process runs in both directions. Encoding turns the Unicode label into its ASCII form for DNS, registrar forms and configuration files. Decoding turns an xn-- label back into the readable characters, which is how you check what an encoded name actually says. Two bounds shape the result: input is lowercased before conversion, a label can reach at most 63 characters after encoding, and the full domain can reach at most 253.
What the browser actually shows
The Unicode form is the normal display. When you visit a site with an international name, the address bar generally shows the readable characters, because that is the name as its owner intends it to be read.
The exception is deliberate. Browsers show the xn-- form for some domains as a safety display, so a lookalike spoof stays visible instead of rendering as a trusted brand. A name built from characters chosen to imitate another name would be dangerous if rendered beautifully; shown raw, as an xn-- string, it fools nobody. So the address bar is not being inconsistent when it switches forms. It is showing you the readable name when that is safe, and the encoded name when the readable one could mislead you.
How to convert a domain, step by step
- Open the Punycode Converter and type or paste a domain in either form: the Unicode name or the
xn--name. - Read the converted result. Each label is converted separately, and plain labels appear unchanged, so you can see exactly which part of the name was encoded.
- If you are checking a suspicious link, also convert the suspicious domain back to Unicode to see what it really says, rather than trusting how it was rendered where you found it.
- Copy the result for wherever the other form is needed: a registrar form, a DNS record, or a support ticket where the exact encoded name matters.
Worked examples: reading the pairs in both directions
Start with bücher.de. Encoding gives xn--bcher-kva.de: the label bücher becomes xn--bcher-kva, and the label de passes through unchanged. Decoding runs the same pair in reverse: paste xn--bcher-kva.de and you get bücher.de back.
The second pair behaves identically. münchen.de encodes to xn--mnchen-3ya.de, and decoding xn--mnchen-3ya.de returns münchen.de. The pattern extends beyond European scripts: the converter's Japanese example encodes to xn--wgv71a.jp, where the whole Japanese label collapses into the encoded string after the xn-- prefix and the country label stays as it is. In every case there is one name and two spellings, and the converter moves between them without changing which name it is.
Limitations and honest tradeoffs
The converter translates between forms; it does not validate the name itself. Converting a name does not mean it can be registered, because registries restrict which scripts and combinations a zone allows, and a name that encodes perfectly may still be refused or already taken.
The display rules deserve the same honesty. This guide describes the general behaviour the two forms imply: Unicode as the normal display, and the xn-- form appearing as a safety display for some domains. The precise conditions vary and are the browser's decision, not a setting this tool controls or a rule this guide can state for every case. What you can always do is check the other form yourself, which is the habit that matters.
Common mistakes
- Treating the xn-- form as a different website. It is the same name in its ASCII spelling.
xn--bcher-kva.deandbücher.deare one domain, not two. - Assuming the readable form is what DNS uses. DNS never sees the Unicode form. It carries the encoded label, which is why registrar and DNS tools ask for the
xn--version. - Expecting every label to change. Plain labels pass through unchanged in both directions. Only labels with non-ASCII characters are encoded.
- Reading an encoded name as proof of a scam. The safety display exists because some names could mislead, not because every encoded name is malicious. Decode it and read what it says before judging.
- Forgetting the lowercase step. Input is lowercased before conversion, so capital letters in what you paste will not survive into the result, which matches how domain names behave anyway.
FAQs
Why does DNS need a punycode form at all? DNS only carries ASCII letters, digits and hyphens, so every international domain exists underneath as an xn-- name. Punycode is the encoding that squeezes a Unicode label into that limited alphabet.
What does per label mean in practice? Each part of the domain between dots is converted separately. In bücher.de, only the bücher label is encoded, giving xn--bcher-kva.de, while the plain de label passes through unchanged.
Why does my browser sometimes show the xn-- form? Browsers show the xn-- form for some domains as a safety display, so a lookalike spoof stays visible instead of rendering as a trusted brand. The Unicode form is the normal display; the raw form appears when the browser decides the readable one could mislead.
What are the size limits on a converted domain? A single label can be at most 63 characters after encoding, and a full domain can be at most 253 characters. The converter also lowercases your input before converting, since domain names are not case-sensitive.
If a name converts cleanly, can I register it? Not necessarily. Converting a name does not mean it can be registered, because registries restrict which scripts and combinations a zone allows. Conversion proves the encoding works, not that the name is available or permitted.
Conclusion
Unicode and punycode are not rivals; they are the human and machine spellings of the same name, and your browser mediates between them every time you follow a link. Knowing both forms means an xn-- string in the address bar reads as information, not as an error. The Punycode Converter lets you flip any name between its forms in either direction, and the companion guide, Punycode Phishing: How Lookalike Domains Trick People, shows how that same check defeats lookalike domains. For more guides in this series, see our URL and Link Tools guides.
References
- RFC 3492, Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications: https://www.rfc-editor.org/rfc/rfc3492
- ICANN, on internationalized domain names and how they are encoded for DNS: https://www.icann.org/resources/pages/idn-2012-02-25-en