IDN Punnycode converter
Type or paste a domain in either field, the other one updates instantly. One domain per line. Everything is converted in your browser.
IDN Punycode Converter: Domain Names with National Letters to ASCII and Back
A domain name can have letters of any alphabet: münchen.de, пример.рф, 日本語.jp. The DNS, the system that finds a site by its name, understands only the letters a-z, the digits and the hyphen. So such a name (an IDN, an internationalized domain name) is written for the DNS in punycode: münchen.de becomes xn--mnchen-3ya.de. This page converts a domain in both directions, at once, as you type. Everything happens in your browser, so the names you enter are not sent anywhere.
How to use it
- Type or paste a domain in the left field (Unicode) to get the punycode form in the right field.
- Or paste a name that starts with
xn--in the right field to see the real name on the left. - You can paste a whole list: one domain on each line, each line is converted by itself, and the empty lines stay.
- A line that is not valid punycode is marked red and left empty, so you can find it.
Examples that you can try:
münchen.deisxn--mnchen-3ya.deпример.рфisxn--e1afmkfd.xn--p1ai日本語.jpisxn--wgv71a119e.jpcafé.frisxn--caf-dma.fr
How punycode works
The algorithm is described in RFC 3492. A domain is cut into labels by the dots. A label that has only ASCII characters stays as it is. A label with other characters is written in two parts: first its ASCII characters (mnchen), then a hyphen and the code of the other characters and their places (3ya). The prefix xn-- in front shows that it is punycode. Each label is converted by itself, and the top-level zone too: in пример.рф both пример and рф are encoded.
The limits of the DNS are counted for the ASCII form: a label can have 63 characters at most and the whole name 253. A long name in national letters can be too long once it is converted, because xn-- and the code take place.
Where you need the punycode form
- DNS records and the settings of a server. The records of a zone and the names in the config of a web server or a mail server are safest written in punycode. Check them with the DNS lookup.
- SSL certificates. The names inside a certificate are stored as punycode, and so you will see them in the list of names of a certificate.
- Registry and WHOIS queries. Many services ask for the ASCII form. Use the punycode with the Whois lookup to see the owner, the registrar and the dates of a domain.
- The history of a domain. The Domain History Checker asks for the punycode form of an international name, and services of this kind, like the Wayback Machine checker, are safest with it too. Convert the name first and then paste it there.
- Tools and scripts. Many programs, libraries and old services do not accept national letters in a domain. After you convert the name, a check of the site with the HTTP status code checker works the same as for any other site.
- E-mail. In an address the part after the @ can be written in punycode (
[email protected]). The part before the @ is not converted: it can have national letters only if the mail servers support it.
Check a link that looks strange
Letters of different alphabets can look the same: the Cyrillic "а" and the Latin "a" are two different characters. This is used by fake sites with a name that looks like a real one (a homograph attack). Paste the domain from a suspicious link into the left field. If the right field shows a name with xn-- where you expected a plain name, the name has letters that are not Latin. Do not enter your password on such a site. Many browsers show the xn-- form in the address bar for a name with mixed alphabets, but not all of them and not always.
Registering an IDN
Not every zone and not every registrar accepts national letters, and each zone has its own list of the letters that it allows. A zone usually accepts only the alphabets that its country uses. Before you pay, check that the registrar supports the IDN of your zone and that the renewal costs the same. If you have not chosen a registrar yet, look at the top domain registrars. After the registration, run the Domain History Checker on the punycode form of the name: it shows if the domain was used before you, and for what.
The same in code
Python: "münchen.de".encode("idna") # b"xn--mnchen-3ya.de"
b"xn--mnchen-3ya.de".decode("idna") # "münchen.de"
JavaScript: new URL("https://münchen.de").hostname // "xn--mnchen-3ya.de"
PHP: idn_to_ascii("münchen.de", IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
idn_to_utf8("xn--mnchen-3ya.de", IDNA_NONTRANSITIONAL_TO_UNICODE, INTL_IDNA_VARIANT_UTS46);
The PHP functions need the extension intl. The Python codec idna follows the older IDNA 2003 rules, so for some letters (for example the German "ß") it can give another result than a browser.
Limitations
- Enter only the domain, without
https://and without a path. To take the domain out of a link use the URL parser. - The converter turns the letters to lower case, writes them in the normal form (NFC), and takes the dots of other alphabets (
。.。) as the usual dot. It does not apply the whole set of the IDNA rules: it does not check which letters a zone allows, and it does not replace the letters that the standards treat differently (like "ß"). A registrar or a browser can refuse a name that this page converts. - It converts the name, it does not check that the domain exists or is free. For that use the Whois lookup.
- The names are not saved or sent anywhere.
Similar tools
Fast and free URL parsing tool by DIEG. Extract host, protocol, path, and query parameters instantly. Essential DevTool for webmasters and SEO experts.
Free whois lookup: registrar, creation and expiry dates, status, DNSSEC and nameservers of a domain, or the network of an IP address. Uses RDAP and WHOIS.
Free DNS lookup online: check A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records of any domain, plus its SSL certificate. Find out why a DNS lookup fails.
Free domain history and expired domain checker: registration date and age, registrar and statuses from RDAP, Wayback Machine history and signs that the domain was dropped and registered again.
Popular tools
Check who hosts a website: the IP address, the hosting company (ASN), the country and the city of the server. Free hosting checker for any domain.
Free IP lookup: find the country, city, coordinates and timezone of an IP address and its host name with a reverse IP (reverse DNS) lookup. IPv4 and IPv6.
Free DNS lookup online: check A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records of any domain, plus its SSL certificate. Find out why a DNS lookup fails.
Check from the United States (New York) whether a website is online: HTTP status code and response time in milliseconds. A free US ping test for any URL.