By · Updated

Punycode Converter

Batch Unicode to xn-- Conversion, With Each Domain's Writing Scripts Shown

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Punycode Converter works

This Punycode converter turns internationalised domain names into the ASCII xn-- form that DNS actually uses, and turns xn-- names back into readable Unicode. Paste one domain, URL or email address per line and it works out the direction for each line on its own.

How the Punycode converter works

DNS only carries letters, digits and hyphens, so a name such as münchen.de is stored as xn--mnchen-3ya.de. Each label (the parts between dots) is converted separately: plain ASCII labels stay as they are, and any label with other characters is encoded with the Punycode algorithm from RFC 3492 and given the xn-- prefix.

Before encoding, the converter lowercases the name and applies Unicode NFC normalisation, which is what browsers do, so visually identical input produces the same result. Full stops written as the ideographic full stop 。 are treated as dots.

The Scripts column lists the writing systems found in the domain, such as Latin, Cyrillic or Han. A single label that mixes scripts, like Latin with Cyrillic, is a common sign of a lookalike phishing domain. Paste suspicious names into the homograph checker for a full verdict.

For URLs and email addresses only the host part is converted. Paths and user names are left out.

FAQ

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

Browsers show the Punycode form when a domain mixes scripts or uses characters that could imitate another name. It is a deliberate protection against homograph attacks, so a domain that always shows as xn-- deserves a second look before you log in.

Is Punycode the same as percent-encoding?

No. Percent-encoding escapes bytes in the path and query of a URL, such as %C3%BC for ü. Punycode only applies to the host name and produces letters and digits, because DNS labels cannot contain the % character at all.

Can every Unicode character be used in a domain?

No. The IDNA 2008 rules forbid symbols, emoji and many punctuation marks, and registries add their own limits per top-level domain. This converter will encode anything so you can inspect it, but a registry may still refuse the name.

See also: all Data & Code tools, Units, Images, Audio & Video, Documents.

Related tools