English

Punycode Converter — IDN to xn-- and Back

A converter between Unicode domain names and their xn-- Punycode form

Runs in your browser · nothing is uploaded

Full URLs work too; only the host part is converted. Replace the examples with your own domains.

Direction

Unicode → xn-- uses the browser’s own URL parser (UTS #46 IDNA processing), so the result is the address the browser really connects to: upper-case and full-width letters are folded and decomposed characters are composed. xn-- → Unicode decodes RFC 3492 Punycode and checks that converting back gives the same name. Everything runs in your browser.

What it is

The Punycode converter turns internationalized domain names into the xn– form that DNS uses, and turns xn– names back into readable text. Browsers show a name like bücher.example or 한글.kr in the address bar, but underneath they connect to xn–bcher-kva.example or xn–bj0bj06e.kr. Use it when a server config, DNS record or certificate form needs the ASCII version, or when you want to read an xn– name from a log.

How to use

  1. Enter one domain per line. Full URLs are fine; only the host is converted.
  2. Choose a direction, or leave it on Auto to decide per line.
  3. Read the result or the error reason for each line.
  4. Copy all successful results, one per line.

How it works

  • Unicode → xn– uses the browser’s own URL parser, so the output is exactly what the browser connects to. It applies UTS #46 (IDNA compatibility processing): case and width folding and normalization, then RFC 3492 Punycode for each non-ASCII label.
  • xn– → Unicode decodes each xn– label with RFC 3492 and checks that encoding the result again gives the same name; otherwise the line is marked invalid.
  • Paths, ports, user info and a trailing dot are removed first. A full domain can be up to 253 characters.

Examples

Input Result
bücher.example xn–bcher-kva.example
한글.kr xn–bj0bj06e.kr
xn–bj0bj06e.kr 한글.kr
https://bücher.example/path xn–bcher-kva.example
EXAMPLE.com example.com
a b.com Error: spaces are not allowed

When you register an internationalized domain, put the xn– form in your web server’s server name and in certificate requests, and keep the readable form for business cards and marketing. Paste a whole list to convert many domains in one go, then copy all the results at once.

FAQ

What is Punycode?

DNS only handles letters, digits and hyphens, so a domain with characters like ü, 한 or 日 is encoded with Punycode (RFC 3492) and prefixed with xn--. bücher.example becomes xn--bcher-kva.example.

When do I need the xn-- form?

In DNS records, web server configuration, TLS certificate requests and email settings, which usually expect the ASCII form. Going the other way helps when an xn-- name appears in logs or headers.

What about upper-case or full-width characters?

They are folded the same way browsers do (UTS #46) before encoding, and decomposed characters are composed. Spaces and symbols that are not allowed in domain names produce an error.

How does the automatic direction work?

Each line is checked on its own: an ASCII-only line with an xn-- label is decoded, anything else is encoded. Choose a direction to force one way.

Are the domains looked up or sent anywhere?

No. Conversion runs in your browser and never contacts the domains.

Missing a tool?