Tools

Home
URL Encode/DecodeHTML Entity EncodeHash GeneratorEncrypt/DecryptRegex TesterUTF-8 Encode/Decode

Punycode Encoder / Decoder

Convert international domain names (IDN) to Punycode and back — batch mode, URL mode, homograph detection

Your files never leave your browser
Unicode0 chars
Punycode0 chars
Ready·

Quick Examples

münchen.de→xn--mnchen-3ya.de
例え.jp→xn--r8jz45g.jp
рф.ru→xn--p1acf.ru
élève.fr→xn--lve-6lad.fr
üöä.üöä.de→xn--4ca0bs.xn--4ca0bs.de
ทดสอบ.ไทย→xn--12co3c1bfi.xn--o3cw4h

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

Paste Domain or URL
➜
RFC 3492 Bootstring Algorithm
➜
Encoded / Decoded Output

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.

INPUT
münchen.de
OUTPUT
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.

INPUT
xn--e1afmapc.xn--p1ai
OUTPUT
пример.рф

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.

INPUT
https://例え.jp/page
OUTPUT
https://xn--r8jz45g.jp/page

Who Uses This

🖥 Domain Registrars

Verify IDN registrations and confirm the correct Punycode form before provisioning DNS records.

🔨 Web Developers

Set up SSL certificates, configure CORS headers, or write redirect rules that reference internationalized domains.

🕵 Security Analysts

Detect homograph phishing attacks where lookalike Unicode characters impersonate legitimate domains.

🌐 SEO Specialists

Audit backlinks and sitemaps that contain encoded international domains to make sure canonical URLs are correct.

Common Mistakes

Encoding an already-encoded domain

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.

Forgetting that each label encodes separately

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.

Mixing up Punycode with percent-encoding

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

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.

Share: