Punycode Converter

Convert international domain names between Unicode and Punycode. Type a domain such as münchen.de and see its Punycode form xn--mnchen-3ya.de, or paste a Punycode name and decode it back. Each label is handled on its own, and labels that are already plain ASCII are left unchanged. The conversion runs in your browser.

Your domain or label

Try the examples: münchen, bücher, münchen.de, or xn--mnchen-3ya.de.

Result

Encoded (Punycode)—
Encoded—
Decoded—
Labels changed—
Labels unchanged—

Enter a domain to convert it.

Worked Example

Example, with the default münchen.de. The domain has two labels, münchen and de. The label de is plain ASCII, so it is left unchanged. The label münchen has a non-ASCII letter, ü, so it is encoded with the Punycode algorithm from RFC 3492: the basic letters mnchen are kept, a hyphen is added, and the position and value of ü are packed into the suffix 3ya. The encoded label is xn--mnchen-3ya, so the whole domain becomes xn--mnchen-3ya.de. Decoding reverses it: the label starts with xn--, the suffix 3ya is unpacked, ü is inserted back after the n, and the result is münchen.de again. A plain label such as example has no non-ASCII letters, so it is unchanged in both directions.

Common Mistakes

Encoding the dots as well as the labels. Punycode works label by label, and the dots stay as dots. Encoding the whole domain as one string gives a wrong result, so each part between the dots is handled on its own.

Forgetting the xn-- prefix. The encoded form of a label always starts with xn--. Without it, a browser reads mnchen-3ya as an ordinary label instead of a Punycode name, and the domain will not resolve.

Decoding a label that is not Punycode. Only labels that start with xn-- should be decoded. Running a plain label through the decoder treats its letters as encoded data and produces nonsense, so this tool only decodes labels with the prefix.

Mixing up case. Punycode is case-insensitive, but the encoded form is written in lower case by convention. Upper-case letters in the input are lower-cased before decoding, so XN--MNCHEN-3YA decodes the same as xn--mnchen-3ya.

Related Tools

Build an htaccess redirect with the htaccess Redirect Generator, check a domain against a range with the IP in CIDR Range Checker, or browse every tool in the Tools hub.

Frequently Asked Questions

What is Punycode?

Punycode is the encoding from RFC 3492 that turns Unicode letters into plain ASCII, so international domain names can work in the domain name system, which only accepts ASCII. The encoded form always starts with xn--.

Why does münchen become xn--mnchen-3ya?

The basic ASCII letters m, n, c, h, e, n are kept as they are, then a hyphen marks the end of them, and the suffix 3ya packs in where the ü goes and what it is. Decoding reads the suffix and puts ü back in place.

What is an IDN?

An IDN, or internationalized domain name, is a domain name that contains letters outside ASCII, such as ü, é, or Chinese characters. Browsers show the Unicode form to people and use the Punycode form behind the scenes.

Do I need to encode every label?

No. Only labels with non-ASCII letters are encoded. A label like de or com is already ASCII, so it stays exactly as it is, and the dots between labels are never encoded.

Is this conversion done on a server?

No. The Punycode algorithm is implemented in plain JavaScript on this page, and the conversion runs in your browser. Nothing is sent anywhere.