Punycode Converter
Convert internationalized domains and URLs between Unicode and ASCII (xn--) locally.
Domains, labels or URLs
empty · one entry per lineASCII result
No converted domain yet
Type an internationalized domain, URL, or load an example.
Examples
German domain
bücher.examplexn--bcher-kva.exampleOne non-ASCII label is encoded; the ASCII label stays untouched.
Japanese label
例え.examplexn--r8jz45g.exampleThe RFC 3492 reference vector demonstrates multi-byte code point handling.
Invalid payload
xn--invalid!.comInvalid Punycode labelA character outside the Punycode alphabet is rejected with its label named.
About this tool
Domain names on the wire are ASCII, but users type names in their own scripts. IDNA solves this by encoding non-ASCII labels as xn-- followed by Punycode. This converter moves between the two representations and shows every label of the hostname separately.
The implementation is a direct, dependency-free transcription of the RFC 3492 bootstring algorithm: basic code points are copied, then non-basic code points are encoded as variable-length digits with an adaptive bias. Decoding reverses the process and validates each digit, so malformed payloads produce an actionable error rather than garbled text.
Conversion runs entirely in the browser. The tool checks empty labels, the 253-character domain limit and the 63-character per-label limit after encoding; it does not perform DNS resolution or validate whether a domain is registered.
What this tool does not do
- This is RFC 3492 Punycode conversion, not full IDNA2008 UTS #46 mapping or normalization.
- No DNS lookup, registration check or homoglyph policy is applied to the result.
- Uppercase ASCII labels are preserved when encoding a whole domain; the Punycode payload itself uses lowercase digits.
How to use this tool
Paste a hostname
Enter a Unicode domain such as bücher.example or an ASCII form such as xn--bcher-kva.example.
Choose a direction
Use Unicode → ASCII to encode, or ASCII → Unicode to decode xn-- labels.
Inspect labels
The table shows each label's original, ASCII and Unicode forms and marks how many were encoded.
Copy the result
Copy or download the converted hostname. Mod+Shift+Enter copies from anywhere in the tool.
Use cases
Register an international domain
See the ASCII form a registrar or DNS zone file requires before submitting an IDN.
Debug hostname bugs
Decode an xn-- label to confirm which Unicode characters a link actually contains.
Security review
Inspect lookalike domains encoded in Punycode when triaging phishing reports.
Learn IDNA
Compare the original and encoded label side by side while reading RFC 3492.
IDNA representation
| Part | Meaning |
|---|---|
| xn-- prefix | ACE label marker defined by IDNA; case-insensitive in practice |
| Basic code points | ASCII characters copied before the last hyphen in the Punycode payload |
| Encoded digits | Variable-base digits for the remaining Unicode code points |
| Dot separator | Labels are encoded independently; dots are never part of a Punycode payload |
A label cannot exceed 63 ASCII characters after encoding; a whole domain cannot exceed 253.
Common mistakes
Mistake:Encoding the entire hostname as one Punycode string.
Fix:Dots separate labels and are never encoded. The tool converts each label independently.
Mistake:Assuming xn-- means the text is encrypted.
Fix:Punycode is a reversible encoding, not encryption; anyone can decode the label.
Mistake:Ignoring the 63-character label limit after encoding.
Fix:A Unicode label may fit while its xn-- form does not. The validation reports the encoded length.
Frequently asked questions
What is Punycode and why does my domain need it?
Punycode is a way to represent Unicode code points using only ASCII characters. DNS hostnames historically allow ASCII letters, digits and hyphens, so IDNA encodes non-ASCII labels with an xn-- prefix plus a Punycode payload. A browser usually performs this conversion when you visit an internationalized domain; the tool lets you inspect it explicitly.
How do I decode an xn-- domain?
Paste the hostname, choose ASCII → Unicode, and read the result. Labels that do not start with xn-- stay untouched, so xn--bcher-kva.example becomes bücher.example with only the first label changed. If the payload is malformed, the tool names the invalid label and explains the problem.
Is Punycode encryption?
No. It is a deterministic, reversible encoding defined by RFC 3492. The output may look opaque, but anyone can decode it; it provides no confidentiality or integrity. Do not use it to hide sensitive data.
Why is my encoded label rejected?
IDNA limits each label to 63 ASCII characters after encoding and the full hostname to 253 characters. A Unicode label can look short but produce a long xn-- form. Empty labels (leading, trailing or doubled dots) and characters outside the Punycode alphabet are also rejected with an explanation.
Does this tool normalize or validate IDN rules?
It implements RFC 3492 Punycode conversion, not the full IDNA2008/UTS #46 pipeline of case folding, NFC normalization and script validation. If you need registration-ready hostnames, apply those rules in your registrar or a dedicated IDNA library.
Does the domain leave my browser?
No. Encoding, decoding, validation and export are all local. The tool does not resolve the hostname, contact a registrar or send content anywhere.
References & standards
Related tools
Anagram Solver & Palindrome
Normalize text for palindrome checks and privacy-preserving anagram analysis.
Binary Text Translator
Convert text to binary or hex bytes and decode it back
Braille Translator
Translate text to Unicode Braille and back with UEB Grade 1 letters, numbers, punctuation and a per-cell dot breakdown.
Caesar Cipher Tool
Encrypt, decrypt and brute-force Caesar shifts with English-frequency ranking and a one-click ROT13 shortcut.
Case Converter & Text Formatter
Convert text between 14 different case formats including camelCase, snake_case, kebab-case with batch processing and advanced options
Character Frequency Analyzer
Count character, letter and word frequencies for text analysis