Encoding

Punycode Converter

Convert Unicode domain names to xn-- Punycode and back — both directions, full domains supported.

Encoding and decoding run locally in your browser. Nothing is uploaded, logged, or stored.

0 chars
0 chars

How to use

  1. Enter a Unicode domain (e.g. 例え.jp) or a Punycode domain (e.g. xn--r8jz45g.jp).
  2. Choose the direction: Unicode → Punycode or Punycode → Unicode.
  3. Click Convert. With full-domain mode on, ASCII labels pass through unchanged.

What is Punycode?

The DNS only understands ASCII, but people want domain names in their own scripts. Punycode (RFC 3492) solves this by encoding non-ASCII characters into an ASCII suffix: the basic characters are copied to the front, a hyphen delimiter follows, and the non-ASCII part is compressed into a bootstring sequence. Browsers show the friendly Unicode form, while the wire format is always xn--….

This tool implements the full RFC 3492 algorithm — including bias adaptation — so it handles any Unicode input, not just common cases. Decoding validates the input and reports malformed sequences instead of producing garbage. Related encoding tools: Base64 and URL Encoder / Decoder.

Examples

Check an IDN registration

See the exact xn-- form your registrar will store before you buy an internationalized domain.

Decode a suspicious link

Decode an xn-- hostname from an email to reveal the Unicode name it actually displays — useful for spotting homograph phishing.

Frequently Asked Questions

Is my input uploaded anywhere?+
No. The conversion runs entirely in your browser.
What does full-domain mode do?+
It splits the input on dots and encodes/decodes each label separately, adding or stripping the xn-- prefix automatically. ASCII-only labels are left untouched.
Is this compatible with browsers and registrars?+
Yes. The implementation follows RFC 3492 exactly, producing the same output as the WHATWG URL and ICU libraries for valid input.
Why do decoded domains matter for security?+
Punycode enables homograph attacks (e.g. Cyrillic а looks like Latin a). Decoding a domain reveals the real characters behind an xn-- label.

Related Tools

Looking for something else? Browse all tools