Punycode / IDN

Convert between unicode and xn-- ASCII form.

Punycode conversion

Input
ask4.com
ASCII (xn--)
ask4.com
Unicode
ask4.com
Is IDN
No

DNS only carries ASCII, so internationalised domain names are encoded with Punycode (the xn-- prefix). Browsers and email clients translate back to Unicode for display.

About Punycode / IDN

DNS only carries ASCII, so internationalised domain names (anything outside the basic Latin alphabet) get encoded in a format called Punycode, prefixed with xn--. This converter goes either direction: Unicode in, Punycode out, or Punycode in, Unicode out. The conversion uses PHP's intl extension implementing IDNA2008 (UTS46), which is the current standard for browser and mail client handling of IDNs.

When to use it

Use this when configuring DNS records for an internationalised domain, since the DNS zone always stores the ASCII form. Check it before registering a non-Latin domain to confirm the Punycode form is correct. Domain investors and brand protection teams use it to spot lookalike attacks that mix Cyrillic, Greek, or other scripts to mimic Latin domains visually.

How to read the results

Output marked is IDN: yes with an ASCII form starting xn-- confirms the input requires encoding for DNS. The Unicode form is the user-facing display. The xn-- prefix is reserved for ACE (ASCII Compatible Encoding) and is recognised by all major TLD registries. If the conversion fails, the input contains characters not allowed by IDNA2008 rules.

Frequently asked questions

Why does my Cyrillic domain look weird in some browsers?

Browsers sometimes display IDNs in Punycode form rather than Unicode as a defence against homograph attacks. Chrome and Firefox both make this decision based on whether the TLD is trusted to publish IDN-safe rules.

Can email addresses use IDNs?

Yes, in both the local and domain parts, defined by SMTPUTF8 (RFC 6531). Support varies though: most modern mail servers accept SMTPUTF8 but some older ones do not. Test thoroughly before relying on IDN email for production.

Is xn-- always followed by random characters?

The characters after xn-- are deterministic, not random. They encode the original Unicode using a variable-length integer scheme described in RFC 3492. The same input always produces the same Punycode output.

Should I register both the Unicode and ASCII forms?

They are the same domain. Registries treat the Punycode form as canonical and DNS only knows about that form. You only register once.

Who Is Online

In total there are 6 users online: 0 registered, 3 guests and 3 bots.

Bots: AhrefsBot Other Bot SemrushBot

Users active in the past 15 minutes. Total registered members: 340