IDN and punycode

Convert domain names between Unicode and punycode, and see which characters could fool a reader.

A domain, label or URL, in Unicode or punycode.

Free: no account needed and nothing is charged.

What the converter does

Domain names were designed for plain ASCII: the letters a to z, digits and hyphens. An internationalized domain name such as bücher.example or a name written in Greek, Cyrillic, Arabic or Chinese still has to travel through DNS in that limited alphabet. The answer is punycode: each label with other characters is encoded into ASCII and marked with xn--. So bücher becomes xn--bcher-kva, and the full name xn--bcher-kva.example is what your DNS host, registrar and certificate actually use.

Paste a name in either form and the converter gives you the other, label by label. It also tells you what each label is made of and whether the name could be mistaken for a different one.

How the conversion works

We follow the same rules browsers and registries use. First every label is mapped the way UTS 46 describes: capitals become lowercase, fullwidth letters and digits become their normal forms, and the ideographic full stop and its relatives become ordinary dots. Then each label is checked against IDNA 2008, which decides which characters a domain name may contain, and encoded.

When a label breaks a rule we say which one and point at the character:

  • a character that isn't allowed in domain names at all, such as a symbol or an emoji;
  • an invisible joining character used where the rules don't allow it;
  • a character such as a middle dot that may only sit between certain letters;
  • right-to-left and left-to-right text mixed in a way that could display misleadingly;
  • a hyphen at the start or end of a label;
  • a label longer than 63 characters once encoded;
  • punycode that doesn't decode, or that isn't the one correct encoding of its text.

Spotting lookalike names

Some characters from different alphabets look almost identical. The Cyrillic letter а is, on most screens, indistinguishable from the Latin a. A name built from such characters, a homograph, can pass for a well-known name while pointing somewhere else entirely. Attackers register them for phishing.

For every label we list the writing systems it uses and judge it with the Unicode security rules in UTS 39:

  • One writing system is normal, whether it's Latin, Greek or Japanese (which mixes kanji and kana by design).
  • Writing systems that are normal together, such as Latin with Chinese, Japanese or Korean, are fine too.
  • Mixed writing systems, such as Latin with Cyrillic, are a warning sign.

We also compute each name's skeleton, the form it takes once every character is replaced by the character it most resembles. When a name's skeleton is plain ASCII, we tell you exactly which ASCII name it can pass for. Each character outside ASCII appears in a table with its code point, Unicode name, script and any lookalike, and in the result the lookalike characters are marked so you can see them at a glance.

How browsers will show it

Browsers protect their users by showing punycode instead of the Unicode form when a name looks risky. Their rules differ and change, so we give the likely outcome and the reason: a name mixing alphabets, using characters outside the recommended set, or passing for an ASCII name will most likely appear as xn--. A name in a single writing system without lookalikes will usually appear as typed.

Names older software reads differently

Four characters were handled differently by the older IDNA 2003 rules: the German ß, the Greek final sigma ς and two invisible joiners. Under the old rules straße.de became strasse.de; under the current rules it is its own name, xn--strae-oqa.de. When that applies we show both, because old software and some registrars may still send visitors to the other name.

Who uses it

Registrars and DNS hosts often want the punycode form, so you may need to convert a name before you add records for it. Security teams use the converter to unmask suspicious links and to check new registrations that resemble their brand. Developers use it to see what their code should store and compare.

Questions

What is the xn-- at the start of a name?
It marks a label written in punycode. DNS only carries plain letters, digits and hyphens, so a label with other characters is stored as xn-- followed by an encoded form. Browsers turn it back into the original characters when it's safe to do so.
Why does my browser show the punycode instead of the real name?
Browsers show punycode when a name could be mistaken for another one: when it mixes alphabets, uses characters that look like Latin letters, or uses characters that aren't recommended in names. The converter tells you which of these applies and says it is the likely outcome, because each browser follows its own rules.
Can I convert a whole URL or an email address?
Yes. Paste a URL and we take the host name from it. Paste an email address and we take the part after the @.
Does the converter look anything up?
No. It runs entirely on our side from the Unicode tables and never touches DNS, so it is free, instant and works for names that don't exist yet. To see whether a name is registered, use the domain availability check.