Skip to content
gohacks.dev
Web

Punycode and IDN Converter

Convert internationalised domain names such as münchen.example to their xn-- ASCII form and back, label by label.

Free · No sign-up · Your inputs stay in your browser

Input

Convert international domain names (Punycode)

Output

2 domains

Unicodemünchen.café.example
ASCII (IDNA)xn--mnchen-3ya.xn--caf-dma.example
Unicode例子.卷筒纸
ASCII (IDNA)xn--fsqu00a.xn--3lr804guic

DNS only carries ASCII, so a label with any other character is sent as xn-- plus its RFC 3492 Punycode. Use the ASCII form in Nginx server_name, certificates and DNS records. Mixed-script names that only look like a brand are why browsers sometimes show the xn-- form.

Runs in this browser. Nothing you paste is sent to a server.

DNS only speaks ASCII

Domain names on the wire are letters, digits and hyphens. An internationalised name is sent as its ASCII-compatible encoding, the xn-- form, and the browser shows the Unicode form to the user. Configuration files, certificates and DNS zones need the ASCII form: server_name xn--mnchen-3ya.example; in Nginx, not the Unicode one.

Homograph attacks

Cyrillic а and Latin a look identical, so a domain mixing scripts can imitate another. Browsers display the xn-- form when a name mixes scripts or looks deceptive, following rules such as those in Unicode Technical Standard 39. If a link shows up as xn--, read it before trusting it.

Share

Frequently asked questions

What does xn-- mean in a domain?
It marks a label encoded with Punycode. Everything after xn-- is the ASCII encoding of a label that contains non-ASCII characters.
Do I need the xn-- form in my SSL certificate?
Yes. Certificates list domain names in their ASCII form, so the subject alternative name for münchen.example is xn--mnchen-3ya.example.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools