Punycode Converter (Internationalized Domain Names)

Convert internationalized domain names (IDN) containing non-ASCII characters, such as Japanese, to and from Punycode (an ASCII-compatible encoding).

Usage Tips

  • A domain name made up of multiple labels (parts separated by `.`) is automatically handled label by label: labels containing only ASCII characters are left unchanged, and only labels with non-ASCII characters are converted to the `xn--`-prefixed form.
  • In "Punycode → Domain Name" mode, only labels that include the `xn--` prefix are decoded; other labels are passed through unchanged.
  • The same conversion logic applies not only to domain names but also to the part after the `@` in an email address (the domain part).
  • When you actually type an internationalized domain name into a browser's address bar, most browsers convert it to Punycode internally before performing DNS resolution.

Frequently Asked Questions

Punycode (RFC 3492) is an encoding scheme that converts domain names containing Unicode characters — Japanese, Chinese, Arabic, and more — known as internationalized domain names (IDN), into strings made up only of the ASCII characters that DNS can handle. The converted label is given an `xn--` prefix.

DNS (the Domain Name System) was originally designed on the assumption that only ASCII characters would be used, so domain names containing Japanese characters or emoji cannot be resolved as-is. Punycode converts domain names with non-ASCII characters into ASCII strings, making internationalized domain names possible without changing the existing DNS infrastructure at all.

`xn--` is known as the "ACE prefix" (ASCII Compatible Encoding prefix), and it signals to DNS and supporting software that the label is an internationalized domain name encoded in Punycode. When browsers detect this prefix, they typically decode it back to the original Unicode string for display to the user.

Yes — this is a known phishing technique called an "IDN homograph attack." There have been reported cases where a Punycode domain (e.g. `xn--80ak6aa92e.com`) encoded using characters that look almost identical to legitimate ones — such as the Cyrillic "а" versus the Latin "a" — was used to impersonate a genuine domain. Major browsers mitigate this by displaying the raw Punycode form (the string starting with `xn--`) in the address bar instead of the decoded Unicode when they detect a suspicious mix of characters.
ツールくん

Side Note — Behind the Scenes of How "Cat" and "日本語" Became Domain Names

Discussion of internationalized domain names (IDN) began in the late 1990s, but standardization took a long time. Several approaches were proposed for handling non-ASCII characters without changing the core of DNS, and ultimately the Punycode approach — encoding and decoding at the application layer (the client side) while leaving the DNS server itself untouched — was adopted and standardized as RFC 3492 in 2003.

The name "Punycode" is said to come from a blend of "Unicode" and "an amusing pun," and the algorithm itself is a specialization, tailored for domain names, of a more general encoding method called Bootstring (a general-purpose technique devised by IBM researchers for encoding an arbitrary character set into a restricted character set). The fact that even the origin of the name "Punycode" is something of an inside joke reflects the kind of humor typical of the developer community.

Today, domain names using a wide variety of languages and symbols — Japanese domains (`.jp`) and even emoji domains (real examples like `💩.la` exist) — are actually registered and in use, but behind the scenes this Punycode conversion process always takes place. Even the elegant Japanese domain name shown in a browser's address bar is exchanged with the DNS server as a plain ASCII string starting with `xn--`.