About the Punycode Converter
Convert internationalised domain names to Punycode and back. Type a Unicode domain such as münchen.de to get the xn-- form used by DNS, SSL certificates and many registrar panels (xn--mnchen-3ya.de), or paste an xn-- domain to see the real characters behind it. You'll need the ASCII form to register an IDN domain or set one up on a server, and decoding is a quick check on a suspicious link.
Put one domain per line to convert a whole list at once. Each part between the dots is handled on its own, so shop.café.fr becomes shop.xn--caf-dma.fr and plain ASCII parts stay untouched. The output follows each edit live, and nothing is sent to a server.
How Punycode conversion works
DNS only allows the letters a–z, digits and hyphens in each label of a domain. Punycode (RFC 3492) is a reversible way to write any Unicode label with just those characters. The converter splits every line at the dots and leaves labels that are already plain ASCII alone. Any other label is first put in lower case and normalised, as browsers do. Then its ASCII letters are copied, a hyphen is added, and a short base-36 code is appended that says which other characters to insert and where. The xn-- prefix tells software the label is encoded.
That's why münchen gives mnchen-3ya: mnchen are the ASCII letters in their original order, and 3ya encodes the ü and its position after the m. A label with no ASCII letters at all, such as 日本, has no hyphen section: it becomes xn--wgv71a.
Decoding reverses the process for every label starting with xn--, whether the prefix is written in upper or lower case. When the decoder can't finish a label, for example because the code stops too early, it returns that label unchanged. It doesn't check the result against IDNA rules, though, so a mistyped code can still decode to the wrong characters; if the output looks odd, re-encode it and compare.
Unicode label → ASCII letters + "-" + base-36 insertion code → "xn--" + result münchen → mnchen + "-" + 3ya → xn--mnchen-3ya
Assumptions and limits
- Labels with non-ASCII characters are put in lower case and normalised before encoding, so ПРИМЕР.РФ and пример.рф both give xn--e1afmkfd.xn--p1ai. Plain ASCII labels are left exactly as typed, which is harmless because DNS ignores their case. The full IDNA mapping table isn't applied, so rare characters such as full-width letters aren't folded to their usual form.
- Paste host names only, not full links: the https:// and the path contain characters that would be encoded too.
- Registry rules aren't checked. Each registry decides which scripts and symbols it allows; most refuse emoji, even though 🚀tech.com converts to xn--tech-4s83c.com.
- ß is kept and encoded, so straße.de gives xn--strae-oqa.de, as current IDNA2008 rules require. Some older software maps it to strasse.de instead, which is a different domain.
- For an email address, convert only the part after the @.
Worked examples
Set up an IDN domain on a server
DNS zone files, web server configs such as an nginx server_name, and certificate requests usually need the ASCII form. Enter münchen.de and use xn--mnchen-3ya.de in those places; visitors still type and see münchen.de in their browser.
Check a lookalike domain before you click
Switch to Punycode → Unicode and paste xn--80ak6aa92e.com. The output is аррӏе.com, which looks like apple.com but is spelled entirely with Cyrillic letters. Decoding an odd xn-- link from an email shows you whether it imitates a name you know.
Convert a list in one go
Press Insert IDN Placeholder Example in encode mode to load four domains. The output lines up with the input, one result per line.
münchen.de → xn--mnchen-3ya.de 🚀tech.com → xn--tech-4s83c.com café.fr → xn--caf-dma.fr پاکستان.com → xn--mgbai9azgqp6j.com
Unicode domains and their Punycode
Read either way: the left column converts to the right in encode mode, and the right to the left in decode mode.
| Unicode domain | Punycode (ASCII) |
|---|---|
| münchen.de | xn--mnchen-3ya.de |
| café.fr | xn--caf-dma.fr |
| bücher.example | xn--bcher-kva.example |
| straße.de | xn--strae-oqa.de |
| 日本.jp | xn--wgv71a.jp |
| пример.рф | xn--e1afmkfd.xn--p1ai |
| پاکستان.com | xn--mgbai9azgqp6j.com |
| аррӏе.com (Cyrillic) | xn--80ak6aa92e.com |
How to use the Punycode Converter
- Pick the direction. Unicode → Punycode (xn--) to encode a domain, or Punycode → Unicode to decode one.
- Enter domains, one per line. Type or paste host names only, without https:// or a path; Insert IDN Placeholder Example fills the box with samples.
- Copy the converted list. Each input line gets its own output line, refreshed with every edit; the Copy button sits above the output box.
Frequently asked questions
What does xn-- mean at the start of a domain?
It's the ACE prefix that marks a label as Punycode. Wherever xn-- appears in a domain, the rest of that label is an ASCII encoding of Unicode characters, such as accented letters, Arabic, Chinese or Cyrillic. Paste the domain into decode mode to read it.
How do I convert a Unicode domain to Punycode?
Choose Unicode → Punycode, type the domain, for example bücher.example, and copy the result, xn--bcher-kva.example. Only labels with non-ASCII characters are changed, so the .example ending stays as it was.
Why does my browser show xn-- instead of the real characters?
It's a guard against phishing. Browsers show the Punycode form when a domain mixes scripts or could be mistaken for another name. Decoding it here shows the actual characters so you can judge whether the site is the one you meant to visit.
Can I use Punycode in an email address?
Yes, for the domain part. user@münchen.de can be written as user@xn--mnchen-3ya.de, which works with mail servers that don't handle Unicode. Non-ASCII characters before the @ need a server that supports internationalised email and aren't converted with Punycode.
Is Punycode the same as URL encoding?
No. Percent-encoding, such as %C3%BC for ü, is used in the path and query of a URL. The host name uses Punycode instead. A full international address can need both: Punycode for the domain and percent-encoding for anything after the first slash.
This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.