devopscodepro
Language
Runs entirely in your browser — nothing leaves this page.

Punycode

Converts internationalized domain names to punycode (xn--…) and back.

 
scheme and path are stripped — only the hostname is converted

Internationalised domain names

DNS carries ASCII only, so a domain with non-Latin characters is transported in its Punycode form, an xn-- prefixed label. This converts in both directions, per label, exactly as a resolver does.

It is the form you need when a certificate, a DNS record or a log line shows xn--e1afmkfd.xn--p1ai and you need to know which domain that is.

Why does each part of the domain convert separately?

Punycode operates per label, between the dots. That is why a mixed domain can have one xn-- label and one plain ASCII label — and why converting the whole string as one unit gives the wrong answer.

What is a homograph attack?

Registering a name that looks identical to a known brand using characters from another script — Cyrillic а instead of Latin a, for example. The two are different domains with different Punycode. Converting a suspicious link is the quickest way to see which one you are actually looking at.

Should I put the Unicode or the Punycode form in my DNS records?

Punycode. Most control panels convert for you, but certificates, SPF includes and CAA records are matched byte for byte — a Unicode form there simply does not match.

Related tools: DNS lookup, WHOIS lookup and Base64.