← All tools
// ENCODERS

Punycode Encoder / Decoder online

Encode international domain names to Punycode (xn--) and decode back to Unicode.

Punycode Encoder / Decoder logo
by
CHUNKY
MUNSTER
INPUT
OUTPUT

About Punycode

Punycode is a way to encode internationalized domain names (IDN) that contain non-ASCII characters into the ASCII subset supported by DNS. For example, "münchen.de" becomes "xn--mnchen-3ya.de". This tool uses the browser's native URL APIs for reliable encoding. Runs entirely in your browser.

How to Use the Punycode Encoder / Decoder

  1. Paste or enter your input into the text field.
  2. Configure any options (format, delimiter, encoding, or mode) using the controls above the output.
  3. The result updates instantly — no submit button required for most operations.
  4. Click Copy or Download to take the output to your next step.

Punycode is the bridge between human-readable Unicode domains (münchen.de, 例え.jp, 🍕.ws) and the ASCII-only world of DNS. This tool converts in both directions using the browser's native URL parser, which implements the IDNA 2008 / RFC 3492 algorithm — so the output matches what every modern browser actually resolves.

How the Punycode Encoder / Decoder Works

Encoding is per label: each dot-separated chunk is examined, and only those containing non-ASCII code points get the "xn--" prefix and ASCII-Compatible Encoding. Decoding reverses the process. Pure-ASCII labels pass through unchanged. The encoding is bit-exact and round-trippable, so any string you encode and then decode returns to its original form.

Frequently Asked Questions

What is Punycode?

Punycode (RFC 3492) is the encoding that lets DNS — which only allows ASCII letters, digits, and hyphens — represent labels containing arbitrary Unicode. Each non-ASCII label is rewritten with the prefix "xn--" followed by an ASCII-Compatible Encoding of the original characters.

Why does "münchen.de" become "xn--mnchen-3ya.de"?

The "ü" cannot live in a DNS label, so it is moved to the end as a numeric reference (3ya) while the basic ASCII letters stay in place. The "xn--" prefix tells software the label is encoded and needs decoding before display.

Are emoji domains supported?

Yes — emoji are just Unicode code points, so they encode the same way. ".ws", ".to", and a handful of other registries actually allow emoji second-level domains; most do not.

Why is Punycode considered a phishing risk?

Lookalike Unicode characters (Cyrillic "а" vs Latin "a") can produce domains that read identically to a human but resolve to a different server — the so-called IDN homograph attack. Modern browsers display the raw "xn--" form for mixed-script domains to mitigate this.

Explore the full suite of ENCODERS tools and 290+ other free utilities at Chunky Munster.