Skip to content

Punycode Converter

Convert internationalized domain labels between Unicode and RFC 3492 Punycode entirely in the browser.

Privacy: your files never leave your device. All processing happens locally in your browser.

How to use

  1. 1.Paste only a domain name and choose Unicode-to-ASCII or ASCII-Punycode-to-Unicode.
  2. 2.Convert and inspect every label; xn-- is added or consumed only at label boundaries.
  3. 3.Copy the result, then validate it with the target registry or URL library and check for look-alike characters.

About Punycode Converter

Punycode Converter translates internationalized domain labels between readable Unicode and the ASCII form used by the Domain Name System. Enter a domain such as bücher.example to receive xn--bcher-kva.example, or reverse an ASCII name beginning with xn--. Every label is processed locally with the RFC 3492 Bootstring algorithm.

Punycode represents Unicode code points using basic ASCII letters, digits and hyphens. Existing ASCII characters are copied first, while non-ASCII values are encoded as variable-length deltas. The algorithm adapts its bias as values are processed. This implementation fixes the RFC constants base 36, tmin 1, tmax 26, skew 38, damp 700, initial bias 72 and initial code point 128.

Domain labels are separated before conversion. Unicode full stops commonly used in CJK text are normalized to an ASCII dot. A label containing non-ASCII code points receives the xn-- prefix after encoding; an ordinary ASCII label is lowercased and left otherwise unchanged. Decode mode only applies Bootstring decoding to labels carrying that prefix.

This scope is intentionally narrower than a complete browser URL parser. The tool does not accept a scheme, path, port, query or fragment, perform percent decoding, resolve DNS, test registration availability or contact a registry. Paste only a domain name. Empty labels, malformed digits, invalid Unicode scalar values and inputs above 1,000 code points are rejected.

Punycode is not a language translator. Decoding exposes the Unicode spelling represented by an ASCII label but does not tell you how to pronounce it or whether it belongs to the organization it resembles. Characters from different writing systems can look nearly identical. A valid conversion is not proof that a domain is trustworthy.

Production URL systems often apply Unicode normalization, contextual rules and UTS #46 mapping before RFC 3492 encoding. This page performs the documented raw label conversion and does not promise identical acceptance decisions to every browser or registry. If a registrar rejects a result, follow that registry's IDN policy rather than altering characters blindly.

Eight external fixtures cover Latin accents, Greek, CJK, symbols, one-label and multi-label domains. Every case is asserted in both directions, including bücher, mañana, 例子, 测试, παράδειγμα and the snowman-command-symbol example. Negative tests cover empty labels and incomplete encoded sequences.

Use encode mode when a DNS or certificate field requires ASCII. Use decode mode to inspect an xn-- name before visiting it. Compare each label, writing system and organization carefully, and let a standards-compliant URL library handle full application URLs. Keep security filters and registry validation separate from this reversible encoding step.

The implementation iterates Unicode code points rather than UTF-16 halves, so supplementary characters remain intact. Arithmetic overflow checks protect delta multiplication and weight accumulation. Output is deterministic for the declared raw Punycode convention, and the copy button copies only the converted domain without a scheme or trailing slash. Label length limits and registry policies still apply after conversion. A syntactically encoded label may be too long, reserved, blocked, or unavailable, so validate the final ASCII name with the authoritative consumer.

Methodology & sources

Each domain label is processed with RFC 3492 Bootstring constants. Non-basic code points are delta encoded with adaptive bias; xn-- labels are decoded into validated Unicode scalar values. Full stops split labels and are not part of the payload.

Frequently asked questions

Encoding & Crypto guides

View all