Punycode / IDN Converter

Convert internationalized domain names (IDN) such as 日本語.jp or münchen.de to their ASCII xn-- form and back. Paste a whole URL or email address and only the domain part is converted. Checks label and domain length, disallowed characters and mixed scripts (look-alike spoofing such as Cyrillic а in аpple.com), converts one domain per line, and also encodes and decodes raw Punycode (RFC 3492).

About this tool

What is Punycode?

Domain names in DNS can only use ASCII letters, digits and hyphens. To use other characters, such as 日本語.jp, münchen.de or emoji, each label (the parts between dots) is converted to ASCII with Punycode (RFC 3492) and given the prefix xn--. The result, such as xn--wgv71a119e.jp, is what is actually registered and looked up. Browsers show the Unicode form in the address bar when it is safe to do so.

How to use

  1. Choose a mode:
    • To ASCII: Unicode domain → xn-- form (for DNS records, certificates, server settings and so on).
    • To Unicode: xn-- form → readable domain (to see what a domain in a link or log really is).
    • Punycode encode / decode: convert a raw string with RFC 3492 only, without xn-- and without splitting at dots.
  2. Type or paste domains, URLs or email addresses, one per line.
  3. Each line shows the result with a copy button, the result for each label, and any errors or warnings. Copy all copies every result, one per line.

URLs and email addresses

In a URL such as https://user@日本語.jp:8080/path?q=1, only the host (日本語.jp) is converted; the scheme, user name, port, path, query and fragment are kept as they are. In an email address, the part after the last @ is converted. The part before the @ (the local part) is not a domain name and is left as is.

How the conversion is done

  • To ASCII uses your browser's own IDNA processing (UTS #46, the same as the address bar via the URL API), which also maps upper-case and full-width letters and checks for characters that are not allowed. The plain RFC 3492 result of this tool is shown for each label; if the two differ, a note explains why.
  • To Unicode decodes each xn-- label with this tool's RFC 3492 implementation, then checks that encoding it again gives the same label.
  • Full-width and ideographic dots (。 . 。) are treated as dots, as IDNA requires.

Checks

CheckRule
Label lengthAt most 63 characters in ASCII form
Domain lengthAt most 253 characters in ASCII form (without a trailing dot)
Empty labela..com has an empty label
HyphensA label must not start or end with -; -- in the 3rd and 4th positions is reserved (except xn--)
CharactersSpaces, <, >, /, @ and other characters that browsers reject are reported
Mixed scriptsA label that mixes scripts, such as Latin and Cyrillic, is flagged as a possible spoofing domain. Normal combinations such as Japanese kanji + kana + Latin are not flagged

Spoofing (homograph attacks)

Some letters in different scripts look the same: Latin a and Cyrillic а, Latin o and Greek ο. An attacker can register xn--pple-43d.com, which displays as аpple.com but is not apple.com. When a decoded label mixes scripts, this tool shows a warning. Results are shown as plain text only, never as links.

FAQ

Why is the ASCII result lower case?

Domain names are not case-sensitive, and IDNA converts letters to lower case before encoding. Raw Punycode encode keeps the case of ASCII letters.

Why does ß or ς give a different result from some other tools?

Older tools follow IDNA2003, which changes ß to ss. Current browsers follow UTS #46 non-transitional processing (IDNA2008), which keeps ß and encodes it (faß.de → xn--fa-hia.de).

Can I convert an emoji domain?

Yes, for example 😀.example → xn--e28h.example. Whether a registry allows emoji is a separate question; most top-level domains do not.

Is my input sent anywhere?

No. Everything is converted in your browser. No DNS lookup is made.