RFC 3492 · xn-- prefix · IDN

Punycode converter

Encodes Unicode domain names into ASCII for Internationalized Domain Names (IDNs). Produces the xn-- prefix form used in DNS. Enter a Unicode label below to see its Punycode equivalent.

0 chars
encodes to
or decode
0 chars

How to use this tool

  1. Type or paste a Unicode domain label — like münchen or 日本語 — into the Unicode label → Punycode box. The xn-- form appears instantly in the Punycode box.
  2. Hit Copy result to grab the Punycode label to your clipboard.
  3. To go the other way, paste a Punycode label into the Punycode → Unicode box — with or without the xn-- prefix — and the decoded text appears in Unicode text.
  4. Use Clear on either side to reset a box and start over.
  5. Note that labels made only of ASCII pass through unchanged — Punycode only kicks in when non-ASCII characters are present.

Why this tool is helpful

Register & configure IDNs

When you register a non-ASCII domain, DNS actually stores the xn-- form. Encode your name first to see exactly what gets stored and delegated.

Read DNS records & logs

Zone files, resolvers, and access logs show IDNs as xn--. Decode them to recover the human-readable name behind the record.

Spot homograph look-alikes

Unicode letters that look like ASCII (e.g. Cyrillic а vs Latin a) encode to different strings. Comparing the two forms exposes spoofed domains.

Build URL-handling code

Browsers and libraries convert IDNs to Punycode internally. Verify your own output matches the RFC 3492 result before relying on it.

Check certificates & redirects

SSL certificate SAN entries list xn-- names. Decode them to confirm which real domain a cert actually covers.

Stay private

Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for internal hostnames and pre-launch domains.

FAQ

What exactly is Punycode?

Punycode is the ASCII encoding of Unicode defined by RFC 3492, used so internationalized domain names (IDNs) can live in the ASCII-only DNS. Non-ASCII labels get a leading xn--.

Why the xn-- prefix?

The prefix signals to DNS and applications that the label is Punycode-encoded, so software can tell an encoded IDN apart from a plain ASCII name.

Why does my all-ASCII label come out unchanged?

Punycode only encodes non-ASCII code points. A label made entirely of ASCII characters is already valid DNS text, so it passes through with no xn-- prefix.

Do I need to include xn-- when decoding?

No. The decoder strips the xn-- prefix automatically if it's present, so you can paste the label either way.

Is Punycode a form of encryption?

No. It's fully reversible with no secrecy — anyone can decode it. It only exists to fit Unicode names into an ASCII format, not to hide data.

What about homograph / look-alike attacks?

Characters from different scripts can look identical but encode to different Punycode. Decoding a suspicious xn-- name reveals its true Unicode, which helps you spot a spoofed domain.

Does any of my data leave my browser?

Never. All encoding and decoding happens locally in JavaScript. Your input is not sent to, stored on, or logged by any server.