Developer Tools
Punycode Converter
Convert internationalized domain names between Unicode and Punycode (xn--) in your browser. Per-label breakdown, RFC 3492, no signup.
Conversion mode
Quick examples
Converted output
xn--mnchen-3ya.de
- Encoded labels
- 1
- Decoded labels
- 0
- ASCII bytes
- 17
- Errors
- 0
Per-label breakdown
Each label of the domain is converted on its own. ACE labels start with the literal prefix xn--.
- Label 1Encoded
Input
münchen
Output
xn--mnchen-3ya
ASCII bytes: 14Has Unicode: yesACE form: no- Mixed-script label: Basic Latin, Latin Extended. Mixing Latin with other scripts can be a homograph-attack signal.
- Label 2Unchanged
Input
de
Output
de
ASCII bytes: 2Has Unicode: noACE form: no
How Punycode works
- DNS only allows letters, digits, and hyphens in a label. To carry non-ASCII names like münchen.de or 例え.jp, IDNA encodes each label that contains non-ASCII code points into ASCII using Punycode (RFC 3492) and prefixes the result with xn--.
- Encoding starts by copying every basic ASCII code point of the label, then describes the non-ASCII code points as a stream of generalized variable-length integers in base 36 (a-z and 0-9), using a self-tuning bias to keep common cases short.
- Decoding is the reverse: read the basic part before the last hyphen, then walk the base-36 digits to recover each non-ASCII code point and insert it at the right position.
- DNS limits each label to 63 bytes after encoding and the full domain to 253 bytes. The breakdown above flags labels that go over the limit so you can shorten them before registering.
- Mixing scripts in one label (Latin plus Cyrillic, for example) is a known signal for homograph-style spoofing. The tool surfaces these mixed-script labels but never blocks the conversion, so you can still inspect or copy the encoded form.
How to use
- Paste a domain or label into the input. Auto detect handles a mix of Unicode and ACE labels in one domain.
- Try a quick example (münchen.de, café.fr, 例え.jp, мир.рф, an xn-- decode sample, or a full URL) to see encode and decode in action.
- Switch the mode to Unicode to ASCII (encode) or ASCII to Unicode (decode) if you want to force a direction regardless of what each label looks like.
- Read the per-label breakdown for the direction, ASCII byte length, and any warnings such as labels that exceed the 63-byte DNS limit or labels that mix scripts in a homograph-prone way.
- Click Copy result to copy the converted domain, or Use output as input to round-trip back to the original form.
About this tool
Punycode Converter turns internationalized domain names (IDNs) such as münchen.de, café.fr, or 例え.jp into their ASCII-Compatible Encoding (ACE) form (xn--mnchen-3ya.de, xn--caf-dma.fr, xn--r8jz45g.jp) and back. The encoder follows RFC 3492 (Bootstring with Punycode parameters) and applies the IDNA xn-- prefix on a per-label basis, so a domain like blog.café.fr becomes blog.xn--caf-dma.fr without touching the parts that are already ASCII. The decoder reverses the process: every label that begins with xn-- is decoded back to Unicode while pure ASCII labels pass through unchanged. Auto detect mode reads each label and picks the right direction based on its contents, which is useful when you paste a mix of ACE and Unicode labels in one domain. The tool accepts a full URL too: schemes (https://), paths, query strings, fragments, and ports are stripped before label processing so you can paste straight from the address bar. The breakdown panel lists every label of the input with its direction, ASCII byte length, whether it contains non-ASCII code points, whether it is already in ACE form, and any per-label warnings (empty labels from double dots, leading or trailing hyphens, and labels that exceed the 63-byte DNS limit). Domain-level stats flag totals over the 253-byte DNS cap. A homograph-aware check surfaces mixed-script labels (for example a domain that combines Latin and Cyrillic) because those are a known signal of look-alike spoofing attacks. Useful when registering or auditing IDN domains, decoding Punycode hostnames in DNS records or email headers, debugging certificate names, comparing visible and on-the-wire forms of a URL, checking that a URL someone shared is actually pointing where it appears to point, and generating xn-- labels for systems that do not handle Unicode hostnames natively. The Punycode encode and decode routines run entirely in your browser, so the domains you paste, including private hostnames and pre-launch project names, never leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
URL Parser
Break a URL into protocol, host, path, query params, and fragment with decoded values.
Open tool
DeveloperURL Encoder Decoder
Encode and decode percent-encoded URLs.
Open tool
DeveloperBase64 Encoder Decoder
Encode and decode Base64 with full Unicode.
Open tool
DeveloperHTML Entity Encoder Decoder
Two-way HTML entity encoder and decoder with named, decimal, and hex modes.
Open tool