Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

IDN Encoder

Convert internationalized domain names to Punycode (xn--) format and back

Your files never leave your browser
Unicode Domain0 chars
Punycode (ACE)0 chars
Ready·

Convert Unicode domain names like münchen.de or 東京.jp to their Punycode xn-- equivalents, or decode cryptic Punycode strings back into readable text. Works both ways — paste in either format and get the other one instantly. And everything runs in your browser. Nothing gets uploaded.

How It Works

Unicode Domain
→
Split & Encode Labels
→
Punycode (xn--) Output

The tool breaks your domain into labels at each dot. For any label containing non-ASCII characters, it applies the Punycode algorithm from RFC 3492 — pulling out ASCII characters first, then encoding the Unicode code points as a compact delta sequence. The result gets the xn-- prefix so DNS servers (which only speak ASCII) can handle it. Decoding reverses the whole process.

Examples

German city domain

A tourism site registered with an umlaut — you need the DNS-safe version for your nameserver config.

INPUT
münchen.de
OUTPUT
xn--mnchen-3ya.de

Decoding a mystery xn-- domain from access logs

Your server logs show traffic from a Punycode domain and you want to know what language it is actually in. Paste it in and decode.

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

Japanese brand with mixed ASCII and Unicode

Only the labels with non-ASCII characters get the xn-- treatment. The TLD stays as-is.

INPUT
東京.jp
OUTPUT
xn--1lqs71d.jp

Who Uses This

👨‍💻 Web Developers

Setting up DNS records and SSL certificates for international domains.

🔧 Sysadmins

Decoding xn-- entries in server logs and mail headers to trace actual domain names.

🛡️ Security Analysts

Checking for IDN homograph attacks where look-alike Unicode characters spoof legitimate domains.

🌍 Domain Registrars

Verifying Punycode output before submitting internationalized domain registrations.

Common Mistakes

Including the protocol in the input

Pasting https://münchen.de instead of just münchen.de will break the encoding. Strip the http:// or https:// prefix first — only the domain part gets Punycode-encoded.

Encoding an already-encoded domain

Running encode on xn--mnchen-3ya.de produces garbled output. If your domain already starts with xn--, you want Decode, not Encode.

Confusing URL encoding with IDN encoding

Percent-encoding (%C3%BC) and Punycode (xn--) are different things. URL encoding is for paths and query strings. Punycode is specifically for domain name labels in DNS.

Technical Details

Frequently Asked Questions

What is Punycode and why do domain names need it?

Punycode is a way to represent Unicode characters using only the basic ASCII letters, digits, and hyphens that DNS understands. When you register a domain with characters like ü, ñ, or 中文, the system converts each label to an xn-- string behind the scenes. Your browser shows the pretty version, but DNS only sees the Punycode.

What is an IDN homograph attack?

An attacker registers a domain using Unicode characters that look identical to Latin letters — for example, using Cyrillic “а” (U+0430) instead of Latin “a” (U+0061). The domain looks the same in the address bar but resolves to a completely different server. Browsers now flag these by showing the Punycode version when characters from multiple scripts are mixed.

Can I encode a full URL with this tool?

No — this tool is built for domain names only. Punycode applies to domain labels, not paths or query strings. Strip the protocol and path first, encode just the domain, then reassemble the full URL yourself.

What is the difference between IDNA 2003 and IDNA 2008?

IDNA 2003 mapped certain characters silently — for instance, “ß” became “ss”. IDNA 2008 treats them as distinct, so “straße.de” stays as-is instead of being forced to “strasse.de”. Most modern browsers and registrars follow IDNA 2008, though some edge cases still differ between implementations.

Is my domain data private when using this encoder?

Yes. The encoding and decoding happen entirely in your browser’s JavaScript engine. Nothing is sent to a server, nothing is logged, and nothing is stored. You can go offline and the tool still works exactly the same way.

Share: