#492 · Developer Tool

Punycode Encoder

Convert Unicode domain labels to their ASCII-compatible Punycode form without touching URL paths or query strings. Each input line is treated as a hostname, label boundaries are preserved, and non-ASCII labels receive the standard xn-- prefix. This is useful for DNS records, certificate requests, allowlists, and logs that require an ASCII representation.

Developer Input

Punycode Encoder
Ad space

How to use this developer tool

  1. Enter one hostname per line without a scheme or path.
  2. Choose whether ASCII output should be lowercased.
  3. Encode and compare each result with the original Unicode name.
  4. Review unfamiliar mixed-script labels before using them in security rules.

What this developer tool does

Each output line is an ASCII hostname suitable for systems that expect IDNA-style ACE labels.

Apply the RFC 3492 bootstring algorithm independently to every non-ASCII dot-separated label and prepend xn--.

Punycode conversion is not a domain availability, IDNA policy, or homograph safety check.

Example

Input: münich.example
Output: xn--mnich-kva.example

Use cases

  • Prepare internationalized DNS names.
  • Normalize certificate and proxy configuration.
  • Compare Unicode and ASCII hostnames in logs.

Tips for reliable output

  • Enter hostnames, not full URLs.
  • Keep both Unicode and ASCII forms in audits.
  • Check registry-specific IDNA rules separately.
  • Inspect mixed scripts for lookalikes.

Processing details

The encoder uses bias adaptation, delta accumulation, and base-36 digits from the Punycode algorithm. Dot-separated labels are processed independently.

This browser-only implementation converts labels but does not apply the full IDNA mapping and validity tables used by registries.

Frequently asked questions

Does Punycode encode a complete URL?

No. It converts internationalized domain labels. Paths, queries, schemes, and ports are outside Punycode.

Why is xn-- added to the result?

The ACE prefix marks a DNS label whose remaining characters contain a Punycode representation.

Are plain ASCII labels changed?

No. Labels that already contain only valid ASCII hostname characters remain readable ASCII.

Does this check whether a domain can be registered?

No. Registry policy, reserved names, and trademark rules are not part of encoding.

Can visually similar Unicode domains be risky?

Yes. Different scripts can contain lookalike characters, so inspect unfamiliar domains before trusting them.

Output fields

FieldMeaning
SummaryHigh-level processing result
StatisticsCounts and validation details
ExportCopy-ready text plus structured data when available