Punycode Converter

Convert international domain names to and from Punycode (xn--) and spot lookalike homograph domains.

Runs in your browser. Nothing is uploaded.

Each line is converted on its own: names with xn-- are decoded, international names are encoded.

How to use the Punycode Converter

  1. Paste one or more domain names or email addresses, one per line, or press Load example.
  2. Names containing xn-- are converted to readable Unicode, and international names are converted to Punycode.
  3. Each line is handled on its own, so a mixed list works.
  4. Copy the converted list, or press Convert back to swap.
  5. If an xn-- label is invalid, the line number is reported.

Convert international domain names

Domain names can contain letters from almost any language, such as münchen.de, 例え.jp or пример.рф. Behind the scenes, though, the domain name system only understands ASCII, so each label is converted to a Punycode form beginning with xn--. You’ll meet both forms in DNS settings, certificates, server logs, email headers and browser address bars. This tool converts between them.

How it works

  • Each line is converted on its own, so you can paste a whole list.
  • Each dot-separated label is handled separately. Labels with non-ASCII characters are encoded, and labels starting with xn-- are decoded. Plain ASCII labels are left unchanged.
  • For email addresses, only the domain part after @ is converted.
  • Ideographic full stops used in Chinese and Japanese text (。) are treated as dots.

The encoding follows RFC 3492, the standard used by browsers, registrars and DNS software.

Spot lookalike domains

Punycode is also a security tool. Phishing sites sometimes register domains that look identical to real ones but use letters from another alphabet, such as a Cyrillic “а” in place of a Latin “a”. In a browser or email the two look the same. Converted to Punycode, the fake one becomes something like xn--pple-43d.com, which is obviously not the real address. If a link looks right but feels wrong, paste the domain here.

Everything happens in your browser. For the other parts of a URL, try the URL Parser.

Frequently asked questions

What is Punycode?

The domain name system only supports ASCII letters, digits and hyphens. Punycode (RFC 3492) encodes Unicode labels in that limited alphabet, and the prefix xn-- marks an encoded label. So bücher.example becomes xn--bcher-kva.example.

Why does my browser show xn-- instead of the real name?

Browsers display the Unicode form only when it looks safe. If a domain mixes scripts in a suspicious way, for example Latin with Cyrillic, the browser shows the xn-- form to protect you from lookalike domains.

What is a homograph attack?

Some letters look identical in different scripts, such as the Latin "a" and the Cyrillic "а". Attackers register domains that look like famous brands but use these lookalikes. Converting a suspicious domain to Punycode reveals the trick, because the xn-- form looks nothing like the real name.

Does it convert email addresses?

Yes. The part after @ is converted. The part before @ is left as it is, because non-ASCII local parts follow different rules (SMTPUTF8).

Is anything sent online?

No. Conversion runs entirely in your browser.

Tutorials