Home

punycode

Punycode is an encoding algorithm that enables Unicode strings to be represented using only ASCII characters, allowing internationalized text to be used in contexts that require ASCII. It is the encoding component of ACE (ASCII Compatible Encoding) in the Internationalized Domain Names in Applications (IDNA) framework. Punycode is defined in RFC 3492 and is widely implemented in browsers, mail systems, and software libraries to support non-ASCII domain labels.

Punycode works by separating ASCII (basic) code points from non-ASCII (non-basic) code points. The basic code

The encoding uses a base-36 numeral system and includes a bias adaptation mechanism that keeps the length

Standards and adoption: Punycode is specified in RFC 3492, and its use within domain names is described

points
are
copied
to
the
output,
while
the
non-basic
code
points
are
encoded
using
a
delta-based
scheme
that
uses
ASCII
letters
a–z
and
digits
0–9.
When
used
in
a
domain
name,
the
encoded
label
is
typically
prefixed
with
xn--,
forming
an
ACE
label
that
DNS
can
resolve.
Decoding
reverses
the
process
to
recover
the
original
Unicode
string.
of
the
encoding
reasonable
for
characters
near
the
ASCII
range.
The
process
is
designed
to
be
reversible
and
deterministic,
ensuring
that
each
Unicode
string
maps
to
a
unique
ASCII
representation
and
can
be
restored.
by
the
IDNA
specifications
(RFC
5890–5894).
It
is
widely
supported
by
major
web
browsers,
operating
systems,
and
DNS
resolvers,
enabling
users
to
input
and
access
domain
names
across
diverse
writing
systems.