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
Image Tools Video Tools Audio Tools Subtitle Tools Font Tools
Analyze Tools Clean Tools Compress Tools Convert Tools Edit Tools Extract Tools Generate Tools Merge Tools Organize Tools Redact Tools Repair Tools Split Tools
Analyze Tools Clean Tools Compare Tools Convert Tools Extract Tools Generate Tools Merge Tools Transform Tools Validate 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

Punycode Converter: IDN Domain ↔ Punycode (xn--) Tool

Use this converter to encode Unicode domain labels as Punycode with the xn-- prefix, or decode xn-- labels back to Unicode. It handles single labels and dot-separated hostnames, preserving the dots, and runs in your browser.

How the Converter Processes Input

Enter one label or hostname per line. Each non-empty line is trimmed, processed separately, and returned with its dot separators intact. Blank lines remain blank.

  • Auto-detect: chooses one direction for the whole line. Unicode anywhere selects encoding; otherwise an xn-- label selects decoding; otherwise plain ASCII also selects decoding.
  • Unicode → Punycode: forces encoding.
  • Punycode → Unicode: forces decoding.

Auto-detect does not choose a separate direction for each label in a mixed line. Use a forced direction when the input mixes content and the result must be predictable.

Options, Validation, and Warnings

  • Lowercase labels: lowercases input before processing when enabled. When disabled, casing is not universally preserved: uppercase xn-- labels may fail canonical validation, and the codec determines the output casing.
  • Validate labels: enables validation checks. During encoding, leading or trailing hyphens and labels longer than 63 characters are rejected. During decoding, the xn-- payload and its canonical round trip are checked. Length is not checked when validation is disabled.
  • Warnings appear under the visible heading Invalid labels: with the reason for each rejected label.

What This Tool Does Not Process

It processes domain-label text only. It does not percent-encode or decode URL paths, query strings, or fragments, and it does not check whether a hostname resolves or is registered. For a full URL, extract the hostname first.

How to Use the Punycode Converter

  1. Enter text: Type or paste one label or hostname per line in the input area.
  2. Load a file: Click Upload to choose a .txt or text/plain file, or drop a text file onto the input area. Its contents populate the input and are then converted.
  3. Choose a direction: Use Auto-detect, Unicode → Punycode, or Punycode → Unicode.
  4. Set policies: Toggle Lowercase labels and Validate labels. Conversion updates as the input changes and reruns when these controls change.
  5. Review and export: Check Invalid labels: warnings, then click Copy or Download .txt.

Frequently Asked Questions

What is Punycode?

Punycode is a bootstring encoding (RFC 3492) that represents Unicode text using ASCII letters, digits, and hyphens. For example, münchen becomes xn--mnchen-3ya.

Why does the ASCII output start with xn--?

xn-- is the ASCII Compatible Encoding prefix used for Punycode labels.

Does this tool work on full hostnames or just single labels?

Both. Enter a single label or a full dot-separated hostname; labels are processed separately and the dots are preserved.

Does this tool encode full URLs, paths, or query strings?

No. It processes hostname labels, not URL schemes, paths, query strings, or fragments. Paste only the hostname from a full URL.

What happens with an invalid or malformed label?

It is reported under Invalid labels: when the active direction or validation settings reject it. Reasons can include an empty xn-- label, an invalid or non-canonical payload, or a disallowed character.

Is my text sent to a server?

No. Encoding and decoding, including uploaded file processing, happen in your browser and are not sent to the server.

Conclusion

For mixed lines, choose a forced direction. Before copying or downloading, review any Invalid labels: warnings.

Related Tools

10 views