Works on this device
Punycode Converter
Type a domain name with letters outside A to Z, such as münchen.de, to get the ASCII form that DNS uses (xn--mnchen-3ya.de). Or type an xn-- name to see the letters it stands for.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your converted names will show here
Type a name, or choose another calculation.
Converted names
How it was worked out
How to use the Punycode converter
- Choose what you want to convert: Unicode name to Punycode, Punycode name to Unicode, or the plain Punycode of any text.
- Type or paste one name on each line. A web address such as
https://münchen.de/karteor an email address such asinfo@münchen.deworks too: only the domain part is changed. - The result shows at once. Copy it, download it as a text file, or download the table as a CSV file.
- Read the Check column. It warns about hyphens, labels that are too long, characters that IDNA 2008 does not allow, and letters from more than one script.
How the conversion works
A domain name is made of labels, the parts between the dots. DNS itself only carries the letters a to z, the digits 0 to 9 and the hyphen. A label with other characters is sent as xn-- followed by its Punycode. This is the IDNA system (Internationalized Domain Names in Applications).
- Mapping: the name is first normalized (Unicode NFKC) and written in small letters. So
BÜCHER.deandbücher.degive the same result, and full-width letters such asebecome ordinary letters. The full stops of Chinese and Japanese (。,.and。) count as dots. - Punycode (RFC 3492): the basic (ASCII) characters of the label are copied first, followed by a hyphen. Then, for each other character, a number says which character it is and where it goes. The numbers are written in base 36 with the letters a to z and the digits 0 to 9, with a changing threshold so that short numbers stay short.
- Prefix:
xn--is put in front of the Punycode of each label that had characters outside ASCII. Labels that were already plain ASCII are kept. - The way back: each label that starts with
xn--is decoded. The tool also codes the result again to check that the label is in its normal form.
Worked example
The name münchen.de has two labels. The label de is plain ASCII and is kept. In münchen, the six basic letters m, n, c, h, e, n are copied and a hyphen is added: mnchen-. The letter ü (U+00FC) goes in at the second place. Punycode turns its code point and its place into the number 869 and writes it as 3ya. With the prefix, the label becomes xn--mnchen-3ya, and the whole name is xn--mnchen-3ya.de.
Other examples: bücher gives xn--bcher-kva, 日本語.jp gives xn--wgv71a119e.jp, and пример.рф gives xn--e1afmkfd.xn--p1ai.
IDNA 2003, IDNA 2008 and browsers
- IDNA 2003 (RFC 3490) mapped some letters before coding: German ß became ss and Greek final ς became σ. It also allowed many symbols.
- IDNA 2008 (RFC 5890 to 5893) keeps ß and ς as letters of their own and does not allow symbols, emoji or punctuation in a label.
- Browsers follow the URL Standard, which uses Unicode UTS 46: a mapping that is close to the one here, with the IDNA 2008 treatment of ß. This page asks the browser it runs in as a second opinion and says when its answer is the same.
- This page keeps ß and ς, as IDNA 2008 does:
straße.degivesxn--strae-oqa.de, where IDNA 2003 gavestrasse.de. The registry of a top-level domain decides which characters it accepts.
The checks in the table
- A label of more than 63 characters in its ASCII form, or a whole name of more than 253 characters. The Domain Name Length Checker counts every label.
- A hyphen at the start or the end of a label, two hyphens in the third and fourth places, or a combining mark at the start.
- Characters that IDNA 2008 does not allow: symbols, emoji and punctuation. Some registries and browsers still accept a few of them.
- Letters from more than one script in one label, such as a Cyrillic letter inside a Latin word. Latin with Chinese, Japanese or Korean script is not flagged, as in the "highly restrictive" level of Unicode UTS 39.
- Cyrillic or Greek letters that look like Latin letters, such as the Cyrillic а in
аррӏе. The tool then shows the Latin name it may be read as.
Limits you should know
- The mapping here is NFKC and small letters. It is close to IDNA mapping for ordinary letters but is not the full UTS 46 table, so a rare character may be mapped another way by a browser or a registry.
- The checks are simple, stated rules. They do not use the full list of confusable characters (UTS 39) and do not know the rules of each registry.
- Punycode is only for domain names. In an email address the part before @ is not changed. Letters outside ASCII there need mail servers that support SMTPUTF8 (RFC 6531).
- The tool does not look up whether a domain exists or who owns it. Use the WHOIS & Domain Lookup for that.
- Up to 500 names at a time.