Skip to content
Webmaster Tools
Text & encodingPunycode / IDN

Punycode Converter (IDN)

International domain names both ways.

Converts in both directions: Unicode to xn-- (ASCII) and xn-- back to Unicode.
Raw Punycode (RFC 3492)

Encodes or decodes one string with the bare algorithm: no xn-- prefix, no lower-casing or IDNA mapping.

Runs in your browser

About the Punycode Converter

Domain names with non-ASCII letters, such as münchen.de or 例え.テスト, are stored in DNS in an ASCII form called Punycode, with an xn-- prefix on each converted label: xn--mnchen-3ya.de. This converter goes both ways. Unicode to ASCII uses your browser's URL parser, which applies the same IDNA rules (UTS #46) browsers use when you type an address; ASCII to Unicode decodes each xn-- label with an RFC 3492 implementation and checks that it round-trips.

It also accepts an email address, converting only the part after the @, and a full URL, converting only the host. Each label is listed with its script, and the converter warns about labels that mix scripts or use look-alike letters, a common phishing trick.

How to use it

  1. Type or paste a domain, email address or URL in either form.
  2. Copy the Unicode or the ASCII result.
  3. Read the label table and any warnings before trusting a name you didn't type yourself.

Examples

  • münchen.de: becomes xn--mnchen-3ya.de.
  • xn--fiqs8s: decodes to 中国, the Chinese top-level domain.
  • pаypal.com: the "а" is Cyrillic, so this is not PayPal's domain.

Common questions

Why do browsers sometimes show the xn-- form?

To protect users. Chrome, Firefox and Safari show Punycode when a label mixes scripts in risky ways or looks too much like a known Latin name, so a fake domain can't pass for the real one.

Is Punycode the same as IDNA?

No. Punycode (RFC 3492) is only the encoding algorithm. IDNA adds the rules around it: lower-casing, mapping compatibility characters, which code points are allowed, and the xn-- prefix. The raw converter at the bottom of the page runs the bare algorithm.

Can email addresses have non-ASCII local parts?

Yes, but Punycode never applies there. Mail servers must support SMTPUTF8 (RFC 6531) to deliver them.