Punycode converter
Domain names can contain letters like ü or 中, but DNS carries only ASCII, so each non-ASCII label is stored as xn-- followed by Punycode. Paste domains or URLs, one per line, and convert in either direction.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Choose Unicode to Punycode, or Punycode to Unicode.
- Paste domain names, one per line, or full URLs.
- Copy the result. A label that is not valid Punycode shows an error naming it.
How it works
For each dot-separated label that has a non-ASCII character, the ASCII characters are written first, then a hyphen, then the other characters as a sequence of base-36 numbers. The numbers describe where each character goes and which character it is, and a bias value adapts as it goes so that short strings stay short. Decoding runs the same steps backward. The implementation follows RFC 3492 and is tested against its sample strings.
Worked example
In münchen, the ASCII letters mnchen come first, then a hyphen, then “3ya” for the ü and its position. With the prefix the label is xn–mnchen-3ya, so the domain is xn–mnchen-3ya.de.
Tips
Browsers show the Unicode form but send the Punycode form. If you set up a domain with a registrar or in a DNS panel, use the xn– form. Look-alike letters from other scripts can imitate a familiar domain, so check any xn– domain you get in a link.
Frequently asked questions
What is Punycode?
Punycode is the encoding defined in RFC 3492 that writes any Unicode string with only letters, digits and hyphens. Internationalized domain names use it: münchen.de is stored as xn--mnchen-3ya.de, where "xn--" marks a Punycode label.
Does this do the full IDNA name preparation?
No. It applies the Punycode algorithm to each label that has non-ASCII characters, after lowercasing it and normalising it to NFC, and it treats the dots U+3002, U+FF0E and U+FF61 as ordinary dots. It does not apply the full IDNA mapping table or check which characters a registry allows.
Can I paste a whole URL?
Yes. Text between separators such as :, /, @, ?, # and spaces is treated as a domain, so the scheme and an ASCII path pass through unchanged. A path or query that contains non-ASCII letters would be converted as well, which is wrong for URLs, so convert the host name on its own in that case.
What is the length limit?
A DNS label is at most 63 characters and a whole name at most 253. The result shows a warning when an encoded label is longer than 63.