All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Punycode Converter

Encode internationalized domain name labels to Punycode (xn--) or decode them back to Unicode - hostname-aware, dots preserved, entirely in your browser.

Conversion direction
Policies

Enter labels or hostnames

Paste one label or dot-separated hostname per line. The converter handles each label on its own, leaves the dots in place, and keeps blank lines blank. If a label is rejected, the output keeps its original value and the reason appears under Invalid labels:.

  1. Enter a label or hostname in the input area, with one item on each line.
  2. Click Upload to load a .txt or text/plain file when the text is already saved.
  3. Choose Auto-detect, Unicode → Punycode, or Punycode → Unicode under Conversion direction.
  4. Set Lowercase labels and Validate labels (LDH rule, length, canonical encoding) under Policies.
  5. Review Invalid labels: warnings, then use Copy or Download .txt for the converted output.

How Unicode labels become Punycode

Choose Unicode → Punycode when the input contains a Unicode label. A plain ASCII label such as example passes through, while a label with non-ASCII characters receives the xn-- prefix. Hostname labels are separated at each period, so the converter never encodes across a dot.

Input:  münchen.example.com
Output: xn--mnchen-3ya.example.com

Auto-detect chooses a direction for each non-empty line. Unicode anywhere selects encoding. If no Unicode appears, an xn-- label selects decoding, and plain ASCII also selects decoding. Choose a forced direction when every label on a line needs the same treatment.

How to decode Punycode to Unicode

Choose Punycode → Unicode for an ASCII-compatible hostname. Labels beginning with xn-- are decoded, while ordinary ASCII labels stay unchanged. Dot separators and a trailing dot remain in the output, and blank lines remain blank.

Input:  xn--mnchen-3ya.example.com
Output: münchen.example.com

What the policy checkboxes change

Lowercase labels changes each non-empty label to lowercase before processing. Clear it when the codec should receive the input casing. The converter always rejects characters outside letters, digits, and hyphens for ASCII labels. With Validate labels (LDH rule, length, canonical encoding) checked, encoding also rejects a leading or trailing hyphen and labels over 63 characters. Decoding checks that an xn-- label uses a canonical Punycode encoding.

A rejected label stays unchanged in the output, and the warning gives its reason. Control characters, spaces, malformed xn-- payloads, and non-canonical encodings can appear under Invalid labels:. Clearing validation skips the optional hyphen, length, and canonical checks, but character errors and malformed decoding can still produce a warning.

Keep URLs out of the input

The converter handles hostname labels. It does not process a URL scheme, path, query string, or fragment, and it does not check whether a hostname resolves or is registered. For a full URL, copy only its hostname into the input.

Upload accepts a text file, and Download .txt saves the converted output. The conversion script reads the input and writes the result in the browser. It contains no fetch, XMLHttpRequest, or sendBeacon call, and the page has no form submission for this text.

When another text converter fits better

Use Text Conversion Tools for other text representation tasks. Choose Base32 Encoder / Decoder for RFC 4648 Base32 with A-Z and 2-7, or Base64 Encoder / Decoder for standard or URL-safe Base64 text. Keep Punycode Converter for domain labels and hostnames.

Frequently asked questions

How do I convert an IDN domain to Punycode?

Choose Unicode → Punycode, enter the label or hostname, and read the xn-- output. Each dot-separated label is processed on its own.

How do I decode Punycode to Unicode?

Choose Punycode → Unicode and enter an ASCII-compatible label or hostname. Labels without the xn-- prefix pass through as plain ASCII.

Does the converter handle a full hostname?

Yes. It handles one label or a dot-separated hostname, preserving every dot and a trailing dot while converting each label independently.

Can I convert a full URL with Punycode?

No. The converter handles hostname labels, not URL schemes, paths, query strings, or fragments. Paste only the hostname portion of a full URL.

Related Tools

48 views