LOCAL TOOL · DEV

Punycode Converter

Domains with letters DNS cannot carry, and the xn-- form that it can.

How to use

  1. Paste a domain, or a whole address — the host is taken out of it.
  2. The direction is picked from what you typed; the switch overrides it.
  3. Each label between the dots is converted on its own, which is how DNS reads them.

Examples

A Korean domain in a config file

한글.한국 is xn--bj0bj06e.xn--3e0b707e. A server block, a certificate or an SPF record usually wants that form rather than the readable one.

Reading an xn-- domain in a log

Paste it in and the other direction tells you what it says. A name that renders as something familiar but encodes as something else is worth a second look.

European spelling

bücher.de becomes xn--bcher-kva.de: the ASCII letters stay where they are and only the rest is encoded, which is why the result is still readable.

This is not percent-encoding

Percent-encoding escapes bytes inside a URL and the result is not a domain. This rewrites the host so DNS can carry it. URL Encoder / Decoder

FAQ

Why do domains need this at all?

DNS carries ASCII letters, digits and hyphens. Punycode (RFC 3492) packs any other character into that alphabet, and the xn-- prefix marks a label as encoded. Browsers do the conversion silently when you type an address.

Why is each part converted separately?

Because DNS resolves label by label. 한글.한국 becomes two independent xn-- labels, and a mixed name like 한글.com keeps its ASCII part untouched.

Is this the same as URL encoding?

No. Percent-encoding (%ED%95%9C) escapes bytes inside a path or a query and the output is not a host name. Punycode converts the host itself, and the output is a valid domain you can put in DNS.

Why did it refuse my domain?

A label cannot exceed 63 characters once encoded, the whole name cannot exceed 253, and an empty label (two dots in a row) is not a name. Korean encodes to roughly three ASCII characters per syllable, so a long Korean label hits the limit sooner than it looks.

Does it register or check the domain?

No. This converts text. Whether the name is registered, resolves or is for sale is a different question and a different service.

Is my input sent anywhere?

No. Both directions are implemented in the page and run in your browser.