Punycode Encoder / Decoder
Convert international domain names (IDN) to Punycode and back — batch mode, URL mode, homograph detection
Quick Examples
Convert international domain names to their xn-- Punycode form, or decode Punycode back to readable Unicode. Paste a single domain, a batch list, or a full URL — the tool picks the right direction automatically and flags homograph phishing attempts along the way. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool detects whether your input is Unicode or Punycode and picks the right direction automatically. Each label in the domain gets processed separately — the xn-- prefix is added per label, not to the whole string. URL mode preserves the protocol and path so you can paste a full address and get only the hostname converted.
Examples
German Domain with Umlauts
A German company registers their brand name with an umlaut. DNS needs the Punycode version.
münchen.de
xn--mnchen-3ya.de
Decoding a Punycode Domain Back to Unicode
You see an xn-- domain in a DNS record and want to know what it actually says. Happens a lot during domain audits.
xn--e1afmapc.xn--p1ai
пример.рф
Full URL with Japanese Characters
You need to encode a full URL that contains a Japanese domain but keep the protocol and path intact. URL mode handles this without manual stripping.
https://例え.jp/page
https://xn--r8jz45g.jp/page
Who Uses This
Verify IDN registrations and confirm the correct Punycode form before provisioning DNS records.
Set up SSL certificates, configure CORS headers, or write redirect rules that reference internationalized domains.
Detect homograph phishing attacks where lookalike Unicode characters impersonate legitimate domains.
Audit backlinks and sitemaps that contain encoded international domains to make sure canonical URLs are correct.
Common Mistakes
Feeding xn--mnchen-3ya.de back into the encoder produces double-encoded garbage like xn--xn--mnchen-3ya-omb.de. Always check if the input already starts with xn-- before encoding.
Punycode applies per domain label (the parts between dots), not to the entire string. münchen.de becomes xn--mnchen-3ya.de — the .de part stays as-is because it is already ASCII.
URL percent-encoding (%C3%BC) and Punycode (xn--) are different systems. Percent-encoding works on the path and query string. Punycode is only for the hostname portion of a URL. Using the wrong one in the wrong place breaks resolution.
Technical Details
- Processing: 100% client-side — no server requests
- Browser Support: Chrome, Firefox, Safari, Edge
- Standard: RFC 3492 (Punycode) and RFC 5891 (IDNA 2008)
- Batch Support: Multiple domains, one per line
- Homograph Detection: Flags mixed-script labels that could be phishing attempts
Frequently Asked Questions
What is Punycode used for?
Punycode converts domain names that contain non-ASCII characters (like accented letters, Chinese, Arabic, Cyrillic) into an ASCII-compatible format that DNS can process. Without it, you can't register or resolve international domain names. Every browser does this conversion behind the scenes when you type a non-English URL.
Is Punycode the same as URL encoding?
No. Punycode only applies to the hostname part of a URL and produces strings that start with xn--. URL encoding (percent-encoding) handles characters in the path and query string, turning them into %XX sequences. They solve related problems but work on different parts of the address.
What does xn-- mean in a domain name?
The xn-- prefix is the ACE (ASCII Compatible Encoding) tag. It tells DNS resolvers that the label after it is a Punycode-encoded international string. If you see a domain starting with xn--, it is an internationalized domain name in its wire format.
What is a Punycode homograph attack?
Attackers register domains using Unicode characters that look identical to ASCII ones — like using Cyrillic “а” instead of Latin “a.” The domain appears legitimate in the browser address bar but actually points somewhere else. This tool flags mixed-script labels to help you spot these fakes before clicking.
Is my data safe when I use this tool?
Yes. The entire Punycode algorithm runs in JavaScript inside your browser tab. Nothing gets sent to a server. You can disconnect from the internet, and the tool still works. Your domains and URLs stay entirely on your device.