Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Converters & Encoders
  3. Punycode Converter
Add to favorites

Punycode Converter

Convert a domain between Unicode and its xn-- form, both ways at once, with the length, validity and lookalike checks that decide whether it resolves

Runs locally in your browserMore converters & encodersJump to full guide

Initializing in your browser…

You might also like

Unix Timestamp Converter

Convert between Unix timestamps and dates in any of 400+ time zones, in seconds, milliseconds, microseconds or nanoseconds

Audio Format Converter

Convert between MP3, WAV, OGG, AAC, M4A and FLAC with a bitrate, sample rate, channel count and bit depth that all reach the encoder, and a panel that reports what was actually written.

Color Converter

Convert between ten colour notations including Lab and OKLCH, check WCAG contrast, and simulate colour vision deficiency

An example conversion

A link in an email points at what looks like apple.com. You want to know whether it really is.

Domain from the link

аpple.com
What Punycode Converter produces

Both forms, plus what the characters really are

Unicode   apple.com
ASCII     xn--pple-43d.com

position 0 is U+0430 (Cyrillic) imitating "a"
This label mixes Cyrillic and Latin in one word.

The two strings are pixel for pixel identical on screen, which is the whole trick, so a warning that says apple looks like apple is useless. Naming the code point is not. The first letter is U+0430, the Cyrillic a, not U+0061, so the name a resolver is asked for is xn--pple-43d.com and it has nothing to do with Apple. The tool shows both forms for anything you paste, lists every character that is not plain ASCII with its code point and script, and separately checks the things that stop a name resolving at all: the 63 byte label limit, the 253 byte name limit, empty labels, stray hyphens, and xn-- labels that are not valid punycode.

What this converter does

DNS carries only letters, digits and hyphens, so a domain name with a character outside that set is written in punycode: the label is encoded by the Bootstring algorithm of RFC 3492 and given an xn-- prefix, which marks it as an ACE label. 日本語.jp is really asked for as xn--wgv71a119e.jp, and münchen.de as xn--mnchen-3ya.de. This converter shows both forms at once for whatever you type, so there is no direction to select and nothing to get the wrong way round. Paste a readable name and the encoded form appears; paste an xn-- name and the readable form appears; paste a whole URL and only the host is used. Alongside them it answers the question the encoding alone does not: whether this name can actually be looked up, and whether it is what it appears to be.

How it works

The punycode itself is implemented here rather than taken from a library, with the parameters RFC 3492 specifies: base 36, tmin 1, tmax 26, skew 38, damp 700, an initial bias of 72, an initial code point of 128, and a hyphen as the delimiter. It is checked in both directions against all nineteen sample strings printed in section 7.1 of the RFC, which cover Arabic, both Chinese scripts, Czech, Hebrew, Devanagari, Japanese, Korean, Russian, Spanish and Vietnamese, and it works on code points rather than UTF-16 code units, so a character outside the Basic Multilingual Plane is one character and not two halves of a surrogate pair.

Before punycode runs, UTS-46 requires lowercasing, normalisation to NFC, and a mapping table that turns thousands of characters into simpler ones (the circled letter U+24D0 into a plain "a", for instance). The lowercasing and the NFC normalisation are done here, which is what makes the two ways of writing an a-with-diaeresis, precomposed or as a plus a combining mark, give the same label. The mapping table is far too large to ship a partial copy of without being quietly wrong somewhere, so the answer this browser’s own IDNA processing gives is computed alongside and shown next to the result. When the two agree, the panel says so; when they differ, it says which one a resolver will actually be asked for.

The length rules run the other way round. A browser applies UTS-46 with the DNS length checks switched off, so it will happily produce a label longer than the 63 bytes DNS allows and a name longer than the 253 bytes a message allows: measured here, an all-diaeresis label is fine up to 57 characters and unresolvable at 58, and the URL parser complains about neither. Both limits are checked and the byte count is shown per label.

Several other things make a name impossible, and each is named rather than swallowed: an empty label, a leading or trailing hyphen, hyphens in the third and fourth position of a label that is not an ACE label, a character no host name may contain, an xn-- label whose contents are not valid punycode, an xn-- label that decodes to pure ASCII, and an xn-- label that does not re-encode to itself. That last one is subtle and real: punycode has exactly one encoding for any given string, so xn--e29bvj decodes to something but encoding that back gives xn--pb45f, which means no such name can have been registered.

Finally, the tool addresses what people usually come here for, which is looking at a suspicious link. Each label is checked for mixing scripts, which is the shape of the classic homograph attack, and every character that is not plain ASCII is listed with its code point, its script, and the Latin letter it imitates if it imitates one. That last part matters more than it sounds: a lookalike label is by definition identical on screen, so a warning that reads "apple looks like apple" tells you nothing, whereas "position 0 is U+0430 (Cyrillic) imitating a" tells you exactly where to look. The lookalike table covers the Cyrillic, Greek and Armenian characters that turn up in real registered domains rather than the whole Unicode confusables file, and the page says so.

Examples

  • German domain

    münchen.de encodes to xn--mnchen-3ya.de

  • Japanese domain

    例え.jp encodes to xn--r8jz45g.jp

  • Russian domain, both labels

    москва.рф encodes to xn--80adxhks.xn--p1ai

How to use

  1. 1Type or paste a domain name, in either form, or paste a whole URL and let the host be extracted.
  2. 2Read both forms side by side: the readable one and the one a resolver is asked for.
  3. 3Check the line under them, which says whether this browser’s own IDNA processing agrees with the result.
  4. 4Read the notes: they name every reason the name would not resolve, and every label that mixes scripts or contains a lookalike character.
  5. 5Use the label table for the byte count of each label against the 63 byte limit.

Key features

  • Both directions computed at once, so there is no mode to select
  • RFC 3492 punycode checked against all nineteen sample strings in section 7.1 of the RFC, encoding and decoding
  • Code point correct, so characters outside the Basic Multilingual Plane encode properly
  • NFC normalisation and case folding, so the two ways of writing an accented letter give the same label
  • The browser’s own IDNA answer computed alongside, with any difference called out
  • The 63 byte label limit and the 253 byte name limit checked, which a browser does not check
  • Empty labels, stray hyphens, disallowed characters and invalid xn-- labels each named individually
  • An xn-- label that does not re-encode to itself is rejected, because no such name can exist
  • Mixed-script labels flagged, with every non-ASCII character listed by code point and script
  • Lookalike characters named by position and by the Latin letter they imitate
  • A pasted URL is reduced to its host
  • Runs entirely in the browser; nothing is sent anywhere

Where this fits

  • Configuring DNS or a certificate

    A zone file and most certificate authorities want the A-label. Paste the readable name and copy the xn-- form, with the byte count confirming each label is inside the 63 byte limit.

  • Reading a suspicious link

    Paste the URL. Any label that mixes scripts is flagged, and each non-ASCII character is listed by code point, so the single Cyrillic letter in an otherwise Latin word becomes visible instead of invisible.

  • Working out why a name will not resolve

    A browser will accept and encode a name that DNS cannot carry. The notes name the reason: a label past 63 bytes, an empty label, a stray hyphen, or an xn-- label that is not valid punycode.

Frequently asked questions

What is punycode?

An encoding from RFC 3492 that writes any Unicode string using only the characters a domain name may contain. A label that needs it carries the xn-- prefix, which is what tells a resolver the rest is encoded.

Why does the tool sometimes show a different answer from my browser?

Because UTS-46 maps some characters to simpler ones before punycode runs, and that mapping table has thousands of entries. Rather than ship part of it, the tool computes the browser’s own answer as well and tells you when the two differ, along with which one is the name that gets resolved.

My browser accepted the name. Why does this tool say it will not work?

A browser applies IDNA with the DNS length checks turned off, so it will encode a label longer than the 63 bytes DNS allows. The name parses and never resolves. The label table shows the byte count for each label.

What does it mean that an xn-- label does not re-encode to itself?

Punycode gives exactly one encoding for any string, so a valid ACE label is always the encoding of what it decodes to. A label that decodes to something which encodes to a different label is not a name anybody can have registered, and browsers refuse it too.

Does a clean result mean the domain is safe?

No. It means the name is well formed and the tool found no mixed script and no lookalike character in its table, which is a subset of the Unicode confusables data rather than all of it. It is not a reputation check and no network request is made.

Private by design

Conversions run on your device in JavaScript. The values you enter are never sent over the network.