Punycode converter
Convert internationalized domains to and from ASCII punycode (xn--), including full URLs and raw RFC 3492 string encoding.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
What this tool does
- Register or configure a Chinese, Japanese or German umlaut domain and check the xn-- form it resolves to before touching DNS records.
- Paste an xn-- hostname from an email, log or certificate and read it back as plain text to spot lookalike or phishing domains.
- Check internationalized domains against their ASCII forms for multi-language sites — paths and query strings are preserved verbatim.
- Encode and decode raw RFC 3492 punycode when writing test cases; inputs without a dot take the raw bootstring path.
Example
Input
中文.cn
Output
xn--fiq228c.cn
Domains convert label by label: labels with non-ASCII characters get the xn-- prefix and punycode encoding, while ASCII-only labels are just lowercased, so .cn stays as it is.
Frequently asked questions
What is the xn-- prefix?
It is the IDNA marker meaning "this label is punycode encoded". Browsers and DNS only understand ASCII hostnames, so labels with Chinese, Japanese or umlaut characters must be encoded into xn-- form before they can resolve.
Why does a plain ASCII string gain a trailing hyphen when encoded?
RFC 3492 output has the shape "basic characters + - + encoded part", and the separating hyphen is written even when there are no non-ASCII characters. Domain conversion adds the xn-- prefix, so you rarely see that trailing hyphen in a hostname.
Can I convert an xn-- domain back to readable text?
Yes. The reverse direction only decodes labels starting with xn-- and leaves everything else untouched, so round-tripping is lossless. If the payload is not valid punycode you get an "not valid punycode" error.
Does it handle full URLs?
Yes. When the input is recognized as a URL with a scheme only the hostname is replaced; path, query, fragment, userinfo and port stay untouched, so https://münchen.de/weg only turns the host into xn--mnchen-3ya.de.
Does converting make any network requests?
No. The encoding and decoding are a pure JavaScript implementation of RFC 3492 — no DNS lookups, no requests, and your domain never leaves the browser.
Keywords:punycodeidnidnaxn--域名domain国际化域名中文域名urlrfc 3492