Your data is never sent to a server or stored anywhere. All processing happens in your browser.

Punycode Converter

Mode
Output

How to Use


  1. Select a mode: Unicode to Punycode (encode) or Punycode to Unicode (decode).
  2. Enter a domain name in the input field.
  3. The converted result appears instantly below.
  4. Click the copy button to copy the output.

What is Punycode?


Punycode is an encoding system defined in RFC 3492 that represents Unicode characters using the limited ASCII character set. It is used for Internationalized Domain Names (IDN), allowing domain names with non-Latin characters (e.g., Japanese, Chinese, Arabic, Cyrillic) to be used in the DNS system.

Examples


  • 日本語.jp becomes xn--wgv71a309e.jp
  • münchen.de becomes xn--mnchen-3ya.de
  • 中文.com becomes xn--fiq228c.com
  • ASCII-only domains (e.g., example.com) are left unchanged.

Use Cases


  • Domain registration: Verify the Punycode form of internationalized domain names before registering them with a registrar.
  • Email debugging: Diagnose delivery issues with email addresses that contain non-ASCII domain parts.
  • Security analysis: Detect homograph attacks where visually similar Unicode characters are used to impersonate legitimate domains (e.g., using Cyrillic 'a' instead of Latin 'a').
  • DNS troubleshooting: Inspect the actual ASCII-compatible encoding stored in DNS records for internationalized domains.
  • Browser compatibility: Check how browsers will encode non-ASCII URLs behind the scenes.

Technical Reference


Punycode is defined in RFC 3492 and used as part of IDNA (Internationalized Domain Names in Applications, RFC 5891). The encoding uses the prefix 'xn--' to indicate a Punycode-encoded label. Each label (part between dots) in a domain name is encoded separately. The encoding algorithm maps Unicode code points to a compact ASCII representation using a base-36 variable-length integer scheme, ensuring all valid Unicode domain labels can be represented within the DNS character set.

Privacy


All conversion happens in your browser. No data is sent to any server.

FAQ


What is the difference between Punycode and URL (percent) encoding?

Punycode is an encoding specifically for domain names (the host part); it represents Unicode using only ASCII with an "xn--" prefix. Percent-encoding (like %E3%81%82) used in URL paths and query strings is a separate mechanism. This tool handles domain Punycode conversion only.

Is the domain name I enter sent to a server?

No. Encoding and decoding both happen entirely in your browser, and the domain name you enter is never sent to or stored on a server.

What happens if I enter an ASCII-only domain?

A domain with no non-ASCII characters, like example.com, is left unchanged when converted to Punycode. Conversion only applies to labels that contain non-Latin characters such as Japanese, Chinese, or Cyrillic.

Does it correctly convert domains with subdomains?

Yes. Each label (the parts separated by dots) is encoded individually. Only labels containing non-ASCII characters get the "xn--" form, while ASCII labels are left as-is.

How can I use it to check for homograph attacks?

A fake domain crafted to look like a legitimate one may appear identical but produce a different "xn--" form in Punycode. For example, Cyrillic "а" and Latin "a" surface as distinct, so you can encode or decode the domain to reveal what it really is.