Punycode Converter

Convert international domain names to punycode and back, a whole list at a time.

Domains or URLs
Converted
Runs locally in your browser

About the Punycode Converter

The domain name system only carries a narrow set of ASCII characters, so a name written in Greek, Arabic, Chinese or simply with a German umlaut has to be rewritten before it can be looked up. Punycode is that rewriting: each label picks up an xn-- prefix and the non-ASCII characters are folded into a compact suffix. The browser address bar hides this, which is why the encoded form looks so unfamiliar when it shows up in a certificate, a log file or a DNS zone.

Detection works per line, so a mixed list needs no sorting first. A line containing an xn-- label is decoded to its readable form, and a line containing characters outside ASCII is encoded. You can also force one direction for the whole list from the dropdown, which is what you want when checking that a set of names round trips correctly.

More than bare host names are accepted. A scheme is preserved, a path, query or fragment is left untouched, and the local part of an email address is kept as it is because only the domain half is subject to punycode. Encoding uses the browser own IDNA implementation, so the case folding and normalisation rules match what your browser would do with the same name in the address bar.

The side by side option prints each input next to its result, which makes a review or a spreadsheet paste straightforward. For one name at a time, Punycode Encode and Punycode Decode are the focused versions.

How to use

  1. Paste one domain, URL or email address per line.
  2. Leave Direction on detect, or force encoding or decoding for the whole list.
  3. Tick Show input and result side by side when you need to review the mapping.
  4. Copy the converted list or download it.

Common questions

What does the xn-- prefix mean?
It is the ASCII compatible encoding flag. It tells a resolver that the rest of the label is punycode and must be decoded to be read.
Are URLs with paths handled?
Yes. Only the host is converted, and the scheme, path, query and fragment are copied through unchanged.
Why should I care about punycode in security terms?
Different scripts contain lookalike letters, so a name that reads like a familiar brand may be an entirely different domain. Seeing the ASCII form reveals it.
Can I convert an email address?
Yes. The part before the at sign is preserved and only the domain is converted.