Punycode Converter
Punycode converter shows each label's encoded ASCII byte count and signed remainder against the 63-byte DNS label limit; negative values show how far a label exceeds that length bound.
Ready. Label-length diagnostics only; no DNS lookup or registration check.
| Unicode label | Encoded ASCII label | ASCII bytes | Remaining bytes |
|---|
Remaining bytes = 63 − encoded ASCII label bytes. The count includes the xn-- prefix but excludes the dot and the next label. RFC 1035, section 2.3.4 specifies the 63-octet label limit. A length result does not establish registration eligibility or compliance with all IDNA or registry rules.
Measured: short, exactly at the boundary, and over the boundary
We created three hostnames using the same letter repeated in the first label, followed by .test. This page's conversion code encoded them and counted the ASCII bytes. A separate Python Punycode implementation independently produced the same labels and byte counts, then decoded them back to the original letters. The table below shows the first label only; its ASCII byte count includes the prefix. The second label, test, remained unchanged in every run.
| Original first label | Encoded first label | ASCII bytes | Remaining bytes |
|---|---|---|---|
éé | xn--9caa | 8 | 55 |
ééééééééééééééééééééééééééééééééééééééééééééééééééééééééé | xn--9caaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 63 | 0 |
éééééééééééééééééééééééééééééééééééééééééééééééééééééééééé | xn--9caaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 64 | -1 |
The short label contains two occurrences of é and produces eight ASCII bytes, leaving 55 bytes. Repeating é 57 times produces exactly 63 ASCII bytes and a remainder of zero. Repeating it 58 times produces 64 ASCII bytes and a remainder of -1. The negative value is kept: it is not rounded or clamped to zero. The encoded form is still displayed for inspection, so a successful encoding operation is not mistaken for a length-compliant hostname.
The output labels and byte counts were measured from generated strings. The signed remainders were calculated by subtracting those counts from the cited limit. This calculation is per label, rather than a count of the visible letters in the whole hostname. For the short sample, test is a separate four-byte ASCII label with its own remainder of 59; the separator does not consume either label's budget.
To reproduce a row, copy its original first label, append .test and select Unicode to ASCII. Compare both rows of the live label table. Then copy the ASCII form, switch to ASCII to Unicode and convert it back. The decoded source letters should match the stated sample. All three fixtures passed this roundtrip in the conversion code and the independent Python check. These controlled fixtures do not establish that every input is allowed by an IDNA profile or a particular registry.
Input, output and limits
Paste one bare hostname, up to 1,000 UTF-16 units. Both directions are available on this page, with a separately copyable Unicode form and ASCII form. Conversion uses Punycode per label. ASCII letters retain their case; the tool does not normalize Unicode, case-fold it or perform full UTS #46 processing. Existing canonical xn-- labels can be decoded. Noncanonical or malformed Punycode, empty internal labels and unsupported ASCII hostname punctuation are rejected without retaining an older result.
One trailing root dot is accepted. The ideographic full stop, fullwidth full stop and halfwidth ideographic full stop are treated as label separators. Spaces, schemes, ports, paths, queries and fragments are not accepted; paste the hostname alone. Unicode-to-ASCII can expose a label longer than the DNS bound for diagnostic purposes. A negative remainder is shown explicitly, and does not become a valid-label claim.
There is no file upload, batch conversion, daily quota, login, registration or saved conversion history. All conversion stays in the browser. No domain is visited and no DNS lookup, availability query or registration request is made.
What the byte budget does and does not check
The 63-octet bound comes from RFC 1035 section 2.3.4. An ASCII output character occupies one octet, so counting the encoded ASCII bytes gives the label's size for this bound. The budget includes xn-- when present. Whole-domain wire length is a separate rule and is not calculated here.
This is not a complete IDNA validator. Unicode eligibility, normalization, contextual and bidirectional rules, registry restrictions, registration availability, ownership and visual similarity are not decided by the byte remainder. An encoded label can still be disallowed by another rule. A positive or zero remainder means only that this encoded label does not exceed this one length bound.
Is decoding a different tool?
No. Select ASCII to Unicode to decode the xn-- labels while retaining ordinary ASCII labels. Both forms and the per-label byte budget remain available. This converts a representation; it does not translate the words in a domain name.
Related representations
Unicode Converter compares text with code points and UTF-8 bytes. URL Decoder and Encoder handles percent-encoded values. HTML Entity Encoder and Decoder handles HTML character references. Punycode labels are a separate representation and this page does not reinterpret those syntaxes.
Related representation walkthrough
This existing video discusses character-art representations, not Punycode. Loading the player connects to YouTube and shares connection information such as your IP address and playback requests.