Input
Result
The result will appear here.DNS only carries ASCII, so a domain like münchen.de or 中国.公司 travels as xn--mnchen-3ya.de and xn--fiqs8s.xn--55qx5d. You meet the xn-- form when configuring DNS records, TLS certificates, nginx server names or e-mail, and you need the readable form when an xn-- domain turns up in a log. This converter does both, label by label, with punycode.js, the implementation Node.js shipped for years. For URLs and e-mail addresses only the domain is converted, so paths, query strings and the part before @ are left as they are.
How it works
- One domain, URL or e-mail address per line; in automatic mode each line goes to Unicode if it contains an xn-- label and to Punycode otherwise.
- Before encoding, the name is lower-cased and normalised, and the ideographic full stop 。 is read as a dot, which is what a browser does with a typed domain.
- Warnings are raised for a label longer than 63 characters, a name longer than 253, and a label that mixes Latin letters with Cyrillic or Greek ones.
- Plain ASCII domains pass through unchanged, and IPv6 literals in URLs are left alone.
Where your data goes
Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.
This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.
What it costs
This tool is free, with no sign-in and no points.
Common questions
- What is a homograph attack?
- Registering a domain that looks like a well-known one but uses characters from another script — аpple.com with a Cyrillic а instead of a Latin a. On screen the two are almost identical; in Punycode they are not: xn--pple-43d.com. This tool flags labels that mix Latin with Cyrillic or Greek, the most common trick. Browsers also show the xn-- form for suspicious names.
- Is this the same as URL encoding?
- No. URL encoding (percent-encoding) is for paths and query strings: ü becomes %C3%BC. Punycode is only for domain names, and only the host part of a URL is converted with it. Use the URL encoder on this site for the rest of the address.
- Is this full IDNA 2008 / UTS #46 processing?
- Not all of it. It lower-cases, applies Unicode normalisation (NFC) and maps the ideographic full stop, which covers the names people actually register. It does not apply every UTS #46 mapping or reject every character a registry would refuse, so a name that converts here can still be refused by a registrar.
The open-source behind it
This tool runs on mathiasbynens/punycode.js, released under MIT. If you need the same behaviour inside your own program, that is the library to reach for.
mathiasbynens/punycode.jsAlso known as
- punycode converter
- idn converter
- punycode to unicode
- xn-- decoder
- chinese domain punycode
- homograph domain check