Skip to content
Toolcroft

Punycode (IDN) Encoder/Decoder - Convert Unicode Domains

Encoding Tools

Encode Unicode domain labels to Punycode (xn--) and decode them in your browser. Uses RFC 3492 Bootstring, not full IDNA or UTS #46 validation.

Try an example

How to use this tool

  1. Choose "Encode" or "Decode" mode.
  2. Enter the Unicode domain name or Punycode domain (e.g. xn--mnchen-3ya.de).
  3. The result is displayed instantly, one label at a time.

Punycode Encoder / Decoder

Punycode is the encoding scheme used to represent Internationalized Domain Names (IDNs) in the DNS. Because the Domain Name System was originally designed for ASCII only, non-ASCII characters (Arabic, Chinese, Cyrillic, accented Latin, etc.) must be converted before they can be used as hostnames.

How it works

Each label (dot-separated component) of a domain is encoded independently. If a label contains non-ASCII characters it gets the xn-- prefix followed by its RFC 3492 Bootstring representation. For example, münchen.de becomes xn--mnchen-3ya.de, while the ASCII de label stays as it is. Each label is shown in the breakdown so you can see which parts changed.

You can also paste a complete URL such as https://münchen.de/shop?q=tea. The tool extracts the hostname, converts its labels, and puts the result back into the same URL while preserving its scheme, port, path, query, and fragment. For an email address such as sales@münchen.de, it converts the domain and keeps the address prefix. It does not percent-encode URL components; use the URL Encoder for that.

Common use-cases

  • Checking what a non-Latin domain looks like in the DNS.
  • Debugging IDNA-related issues in email or certificate SANs.
  • Verifying that a homoglyph-based phishing domain differs from the legitimate one.

Homoglyph phishing

Homoglyph attacks exploit Unicode characters that look visually identical (or nearly identical) to common Latin letters. For example, the Cyrillic small letter “a” (U+0430) is indistinguishable from the Latin “a” (U+0061) in most fonts. A domain like аpple.com (Cyrillic α) encodes to xn--pple-43d.com — clearly different in Punycode form but visually identical in the browser address bar. Always check the Punycode form of unfamiliar Unicode domains before trusting them.

IDNA2003 vs. IDNA2008

Two standards govern internationalized domain names. IDNA2003 (RFC 3490, widely deployed) applies Unicode normalization and case folding before encoding. IDNA2008 (RFC 5891, newer) has stricter rules about which Unicode code points are permitted and does not perform the same normalizations. Some domains valid under one standard are rejected by the other — a source of subtle cross-platform compatibility issues in email and TLS certificates.

This converter lowercases its input, normalizes encoded labels to Unicode NFC, and applies the RFC 3492 Bootstring algorithm. It does not implement all IDNA2008 or UTS #46 mappings, contextual rules, or registry validity checks. In particular, producing an xn-- label does not prove that a registrar will accept it or that every browser will display it the same way. For a registration or security decision, also check the domain with the relevant registrar and browser; Punycode output alone does not detect lookalike characters.

Frequently asked questions

What is Punycode?

Punycode (RFC 3492) is an encoding syntax that converts Unicode characters to ASCII. It is used to represent Internationalized Domain Names (IDN) in the DNS, which only supports ASCII.

What does "xn--" mean?

"xn--" is the ACE (ASCII Compatible Encoding) prefix defined by RFC 3490. Any domain label that starts with "xn--" is a Punycode-encoded label.

Can I encode an entire URL?

Yes. Paste a full URL and the tool converts only its hostname, preserving the scheme, port, path, query, and fragment. It also preserves an email address prefix such as user@ while converting the domain.

Does this tool validate IDNA domains?

No. It lowercases and NFC-normalizes input, then applies RFC 3492 Bootstring to each label. It does not implement full IDNA2008 or UTS #46 character mapping and validity checks, so use a browser or registry check before relying on a domain for registration or security decisions.

Browse all encoding tools