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. All processing happens entirely in your browser - your files never leave your device. No uploads, no accounts, complete privacy.

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 internationalized domain names (IDN) between Unicode and Punycode ASCII encoding. Support for non-ASCII domains.

Convert internationalized domain names (IDN) to and from their Punycode representation. If you work with domains containing non-ASCII characters, like umlauts, Chinese characters, or Arabic script, this tool shows you the xn-- encoded form that DNS actually uses.

Runs locally in your browserMore converters & encodersJump to full guide

Initializing in your browser…

You might also like

Unix Timestamp Converter

Convert between Unix/Epoch timestamps and human-readable dates. Supports seconds and milliseconds with timezone information

Audio Format Converter

Convert audio files between WAV, MP3, OGG, AAC, M4A, FLAC formats online. Adjust bitrate and quality settings. Free browser-based conversion with no file uploads to servers.

Color Converter

Convert between HEX, RGB, HSL, and CMYK color formats

An example conversion

You registered an internationalised domain and need its ASCII (Punycode) form for DNS and TLS certificate config.

Unicode domain

münchen.de
Punycode Converter produces

Punycode (ASCII)

xn--mnchen-3ya.de

DNS only allows ASCII, so Unicode labels are encoded with the `xn--` ACE prefix; "münchen" becomes `mnchen-3ya`, which encodes both the base letters and where the non-ASCII character belongs. Seeing both forms also helps spot homograph phishing, where a lookalike Unicode domain hides a very different Punycode reality.

What this converter does

Convert internationalized domain names (IDN) to and from their Punycode representation. If you work with domains containing non-ASCII characters, like umlauts, Chinese characters, or Arabic script, this tool shows you the xn-- encoded form that DNS actually uses.

How it works

This converter implements the Punycode Bootstring algorithm (RFC 3492) directly in the browser rather than calling a library, using the standard parameter set hard-coded in the component: 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. The adaptive bias function and the main encode/decode loops follow the spec, including overflow guards that throw when an intermediate value would exceed Number.MAX_SAFE_INTEGER. All work happens client-side as you type, so domains never leave your machine, and a mode toggle flips between Unicode-to-Punycode and Punycode-to-Unicode with the input/output panels swapping which side is editable.

Crucially, encoding is applied per label, not to the whole string. The domain is split on dots, and each label is handled independently: a label is only Punycode-encoded if it contains a character outside the ASCII range (the regex /[^\x00-\x7F]/), in which case it is lowercased and prefixed with the xn-- ACE marker; pure-ASCII labels such as the .jp or .com suffix pass through untouched. Decoding is the mirror image - only labels that begin with xn-- (case-insensitively) are run through the Bootstring decoder, and any label whose Punycode is malformed is silently returned as-is rather than erroring the whole domain, because the decode is wrapped in a per-label try/catch. So 日本語.jp becomes xn--wgv71a119e.jp and münchen.de becomes xn--mnchen-3ya.de, while the TLD label is left as plain ASCII.

Because the tool surfaces the literal xn-- form of any Unicode domain, it is useful for inspecting suspicious internationalized links: a label that visually reads like a familiar brand but contains a Cyrillic or other look-alike character will encode to a distinct xn-- string, which is the same canonical form browsers display for confusable labels. Note that this is a faithful round-trip codec only - it performs Punycode encode/decode and the xn-- prefix logic, but it does not run IDNA2008 or UTS-46 mapping, NFC normalization, or the script-mixing and confusable-detection rules that real registrars and browsers enforce, so a clean conversion here is not a validity or safety verdict. Six preset example domains spanning Japanese (日本語.jp), German (münchen.de), Russian (москва.рф), Chinese (中文.com), Arabic (القاهرة.مصر), and Korean (한국.한국) scripts are provided to load and convert with one click.

Examples

  • German domain

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

  • Chinese domain

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

How to use

  1. 1Enter a Unicode domain name to get its Punycode form.
  2. 2Or paste a Punycode string (starting with xn--) to see the Unicode version.
  3. 3Copy the result.

Key features

  • Unicode to Punycode encoding
  • Punycode to Unicode decoding
  • Handles full domain names with multiple labels
  • Shows the xn-- prefix used in DNS

Frequently asked questions

What is Punycode?

Punycode is an encoding that represents Unicode characters using only the ASCII characters allowed in domain names. It lets internationalized domain names work within the existing DNS infrastructure.

Why do internationalized domains need encoding?

DNS was designed for ASCII only. Punycode bridges the gap by encoding Unicode domains into ASCII-compatible form so they can be resolved by any DNS server.

Private by design

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