Punycode Converter (IDN ⇆ xn--)

Convert internationalized domain names between Unicode and the ASCII xn-- Punycode form in both directions, label by label, per RFC 3492.

The xn-- form is the name DNS, browsers and registrars actually store: a domain with accents or Hangul travels over the wire as this ASCII string, and only the address bar turns it back.

A whole link works too: start it with its scheme (https://) and only the host is converted — the port, path, query and fragment stay exactly as typed.

Decoding an xn-- name is how you see what a link really spells. Attackers register look-alike domains that swap a letter for an identical one from another alphabet — Cyrillic а for Latin a — which is why browsers show such names as xn-- instead. A password manager will not fill your password into a look-alike.

More examples:

What Punycode is for

Domain names on the internet were originally limited to plain ASCII letters, digits and hyphens. Punycode, defined in RFC 3492, is the encoding that lets an internationalized domain name (IDN) written in Unicode — with accents, umlauts, Cyrillic, Chinese, Japanese, emoji or any other script — travel through that ASCII-only system. Each label that contains non-ASCII characters is transformed into a reversible ASCII string and given the xn-- prefix, so münchen.de becomes xn--mnchen-3ya.de. Your browser shows the pretty Unicode form in the address bar, but behind the scenes it resolves the xn-- version.

How this converter works

Type a Unicode domain in the top box to see its ASCII xn-- equivalent instantly, or paste an xn-- domain in the bottom box to decode it back to human-readable Unicode. Each dot-separated label is handled on its own: pure-ASCII labels such as com or de pass through untouched, while only the labels that actually contain non-ASCII characters get the xn-- treatment. The tool implements the full RFC 3492 encode and decode algorithm, including surrogate-pair characters like emoji, so an encoded label decodes back to the same characters. Paste a whole link that starts with its scheme, such as https://münchen.de/straße?q=ü, and only the host is converted: the user name, port, path, query and fragment stay exactly as typed, not URL-encoded. A host and path with no scheme in front, like münchen.de/path, is refused. The example buttons under Sample and Clear load a Hangul top-level domain, Hangul beside ASCII labels, Hangul and digits in one label, an umlaut and a whole link. Set Encode as to Plain string (Bootstring) to encode a string exactly as given instead — no xn-- prefix, no splitting at dots, no lower-casing. For a whole list, paste domains one per line into the box below the Unicode and Punycode fields, or open a text file: each line is turned into its other form — an xn-- line is decoded, anything else encoded — and a line that cannot be converted is marked rather than dropped. If either box holds something that cannot be converted, the other box is emptied and the reason shown, so an old answer never sits beside the error.

Frequently asked questions

Why does my Punycode domain start with xn--?

The xn-- prefix (called the ACE prefix) marks a label as an ASCII-encoded internationalized name. When software sees xn-- at the start of a label it knows to decode the rest with the Punycode algorithm to recover the original Unicode characters.

Does the converter change the ASCII parts of my domain?

No. Labels are split on the dots and only labels containing non-ASCII characters are encoded. Ordinary parts like www, com or de are left exactly as they are, so nothing that was already valid ASCII is altered.

Why decode an xn-- domain?

To see what a link really spells. Attackers register look-alike domains that swap a Latin letter for a Cyrillic or Greek one that looks the same; decoded, the name shows the mix, and the tool warns when a label mixes those scripts or is made entirely of look-alike letters.

Can I convert a list of domains at once?

Yes. Paste them into the list box under the Unicode and Punycode fields, one per line, or fill it from a text file with the Open file… button. Each line is turned into its other form on its own — an xn-- line is decoded and anything else encoded — so a list mixing both works, a line that cannot be converted comes back marked with ✗ instead of vanishing, and Copy list takes the whole result.

Can I paste a whole link, not only a domain?

Yes, as long as it starts with its scheme, such as https://. Only the host is converted, in either box and in the list: the user name, port, path, query and fragment are kept exactly as typed rather than URL-encoded, so https://münchen.de/straße becomes https://xn--mnchen-3ya.de/straße. A host followed by a path with no scheme in front, such as münchen.de/path, is still refused.