Punycode Converter — IDN to xn-- and Back

Developer

A punycode converter translates internationalized domain names (IDN) containing non-ASCII characters into the DNS-compatible xn-- ASCII form (RFC 3492) and back.

What is it

DNS only handles ASCII, so domains with Korean, Chinese, or accented characters cannot be registered as-is. Punycode is an algorithm that safely encodes a Unicode label into ASCII; the encoded label gets an xn-- prefix to form an internationalized domain (IDNA). For example, 한국.kr becomes xn--3e0b707e.kr. This tool encodes and decodes per label (split on dots) and uses the browser URL API's IDNA normalization for encoding. Everything runs in your browser.

IDN label = "xn--" + Punycode(non-ASCII label) — RFC 3492 Bootstring encoding

How to use

  1. 1Enter a Unicode domain (e.g. münchen.de) or an xn-- domain.
  2. 2Choose encode or decode mode.
  3. 3Press convert and copy the resulting domain.

Reference

Punycode Converter — IDN to xn-- and Back Reference
Unicode domainPunycode
한국xn--3e0b707e
münchenxn--mnchen-3ya
bücherxn--bcher-kva
中国xn--fiqs8s

Sources & standards

FAQ

What does the xn-- prefix mean?

It is the IDNA standard prefix marking a label as a punycode-encoded internationalized label (A-label). DNS and SSL certificates use this ASCII form.

Which form does the browser address bar show?

It depends on the browser. Trusted domains are displayed in their Unicode form, but when a homograph (look-alike) phishing attack is suspected, browsers show the raw xn-- form instead.

Is the domain I enter sent to a server?

No. Encoding and decoding happen in your browser; nothing is transmitted and no DNS lookup is performed.

Related tools