Skip to main content

Punycode Converter

Convert internationalized domain names (IDN) to and from Punycode ASCII form (xn--) per RFC 3492/RFC 5891. Encode Unicode domains like münchen.de to xn--mnchen-3ya.de, or decode Punycode back to Unicode — ASCII labels pass through unchanged.

Input

Uncheck to treat the whole input as a single opaque label instead of splitting it into dot-separated domain labels.

Output

Result
 
Per-label breakdown
OriginalConverted
No data yet
Was this helpful?

Guides

What is Punycode?

Punycode is a way of encoding Unicode text using only the limited character set (az, 09, -) that the Domain Name System permits. It exists because domain names were originally ASCII-only, but the web needed to support domains written in every script — German umlauts, Chinese characters, Arabic, Cyrillic, emoji, and more. Punycode is the encoding behind Internationalized Domain Names (IDN): münchen.de becomes xn--mnchen-3ya.de, a form any DNS resolver can handle even though it has never heard of German.

The algorithm is standardized in RFC 3492 (the Bootstring encoding) and applied to domains per RFC 5891 (IDNA2008). Browsers, registrars and DNS servers convert silently between the human-readable Unicode form and the ASCII xn-- form — this tool exposes that conversion directly so you can inspect, debug, or generate either side.

How this tool works

  1. Paste a domain (or any text label) into the Domain or Text box — either its Unicode form (münchen.de) or its Punycode form (xn--mnchen-3ya.de).
  2. Choose Encode to go from Unicode to Punycode, or Decode to go the other way.
  3. Leave Process full domain checked to split the input on dots and convert each label independently — this is the correct mode for real domain names, since only non-ASCII labels get an xn-- prefix while ASCII labels (like a .com or .de suffix) pass through unchanged. Uncheck it to treat the entire input as one opaque label, useful when converting a single word or a non-domain string that happens to contain a literal dot.

The result updates automatically as you type, and a per-label breakdown table shows exactly how each dot-separated part of the domain was converted — handy for multi-label domains like café.example.com, where only the first label (café) changes.

Why domains can have mixed ASCII and Punycode labels

A domain name is a sequence of labels separated by dots, and each label is encoded independently. café.example.com becomes xn--caf-dma.example.com — the café label is converted to Punycode because it contains a non-ASCII character, while example and com are already plain ASCII and pass through untouched. This is also why every IDN's ASCII form is easy to spot: any label starting with xn-- is Punycode; anything else is already ASCII.

Is xn-- always followed by garbage-looking characters?

Yes — after xn--, the rest of the label is the Bootstring-encoded form of the Unicode characters, which has no resemblance to the original text. That's expected: Punycode isn't designed to be human-readable, only unambiguous and reversible. Decoding xn--mnchen-3ya always returns exactly münchen, and never anything else.

Common uses

  • Debugging why a domain someone sent you looks like xn--... in a browser's address bar (a legitimate IDN, or occasionally a phishing lookalike domain — always check what it decodes to).
  • Generating the ASCII form of an internationalized domain to register it or add it to a config file, certificate, or DNS record.
  • Understanding email addresses and URLs that mix scripts.

Privacy

This tool runs entirely in your browser — your input is never uploaded to a server.

punycodeidndomainunicodeasciixn--rfc3492

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.