Format Code Now
/

Punycode Converter

ED-22

Paste domain names, one per line, to turn Unicode names into their xn-- form or the reverse. The conversion follows RFC 3492 and runs in your browser.

Runs in your browser. Nothing is uploaded.

Domain names, one per line

Result

How to use it

  1. Paste one host name per line, for example bücher.example.
  2. Click Unicode to Punycode to get xn-- names, or Punycode to Unicode to read them.
  3. Check the result line by line. Empty lines stay empty.
  4. Copy the result, or download it as a .txt file.

What the conversion does

Each name is split at dots into labels. A label that contains a non-ASCII character is lowercased and written as xn-- plus its Punycode, so bücher becomes xn--bcher-kva. Labels that are already ASCII are lowercased and otherwise left alone. Going back, any label that starts with xn-- is decoded and the rest are kept as they are. The algorithm is the one in RFC 3492, written out here and checked against that document samples.

What it does not do

Browsers and registries apply more rules than Punycode: IDNA2008 and the Unicode UTS 46 mapping. This tool does not map full-width or look-alike characters, normalize text, check which scripts a registry allows, or treat the ideographic full stop as a dot. It also does not check the 63 character label limit. For a final answer on a particular name, check it with your registrar.

Input format

Give bare host names, not URLs. A line with a slash, colon, at sign, question mark, hash or a space is rejected with the line number, so paste only the domain part. The conversion works on each label separately, which means the dots and any trailing dot stay in place. Uppercase letters are lowercased when encoding because host names are not case sensitive.

Error messages and what to do

MessageWhat it meansFix
is not a bare host nameThe line contains a character such as / : @ ? # or a space, so it looks like a URL, an address or a sentence.Paste only the domain name, one per line.
Invalid Punycode characterAn xn-- label contains a character that Punycode does not use after the hyphen.Copy the label again; only a to z and 0 to 9 appear after the last hyphen.

Questions people ask

How do I convert a domain to Punycode?

Paste the Unicode domain, such as münchen.de, and click Unicode to Punycode. The tool returns xn--mnchen-3ya.de. Only labels with non-ASCII characters get the xn-- form, so the de part stays as it is.

How do I decode an xn-- domain?

Paste the name and click Punycode to Unicode. Each label that starts with xn-- is decoded, for example xn--bcher-kva.example becomes bücher.example. Labels without the prefix are returned unchanged.

What is Punycode used for?

Domain name lookups only allow ASCII letters, digits and hyphens, so names with other characters are sent in an ASCII form. Punycode, defined in RFC 3492, is the encoding for that. The xn-- prefix marks a label that holds it.

Is this the same as the conversion browsers do?

It uses the same Punycode algorithm, but it is not full IDNA2008 or UTS 46 processing. It does not normalize or map characters, and it does not check what a registry allows. A browser may therefore accept or change a name that this tool treats differently.

Why did my capital letters turn lowercase?

Host names are not case sensitive, and the xn-- form is written in lowercase. When encoding, every label is lowercased. When decoding, labels without xn-- are left exactly as you typed them.

Is the domain list uploaded?

No. The conversion runs in your browser, and the names you paste are not sent anywhere. The tool never looks a domain up or checks whether it exists or is registered, so it works with names that are not live yet.

About this tool

Implements the Punycode algorithm of RFC 3492 and splits names at ASCII dots. A label with any non-ASCII character is lowercased and written as xn-- followed by its Punycode; labels that are already plain ASCII are lowercased and otherwise left alone. This is not the full IDNA2008 or UTS 46 processing that browsers and registries use: it does not map look-alike or full-width characters, apply normalization, check which characters or scripts a registry allows, or split names at the ideographic full stop. The 63 character label limit is not checked. Give host names only, not URLs.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.