Christmas−30 % for 12 months with codeGet the offer →
  1. Home
  2. Free tools
  3. Punycode converter
Free tool, no sign-up

Punycode converter

The Punycode converter turns a domain name with accents or written in another script into the “xn--” form that DNS can read, and back again. Paste up to 50 domains, get both forms ready to copy and immediately spot the mixed scripts used to imitate a well-known domain.

  • Both directions, 50 lines
  • Mixed scripts flagged
  • Runs in your browser
Punycode converter result: accented domains and their xn-- form, with mixed scripts flagged in red
Instant conversionReadable form and xn--
Homoglyph detectedLatin and Cyrillic mixed
What the tool does

Two forms, one script check

The converter applies the IDNA standard to each line, then analyses the characters to spot names that try to imitate others.

To Punycode

An accented or non-Latin domain is converted into the ASCII form preceded by xn--, the one you need to enter in a DNS zone, a certificate or a configuration file.

To readable form

Any line containing xn-- is decoded according to RFC 3492, to reveal the real name behind a code spotted in a log, a link or email headers.

Mixed scripts

Each part of the name is analysed. A word that combines Latin and Cyrillic, or Latin and Greek, gets a red badge: this is the classic signature of a homoglyph.

Twelve scripts recognised

Latin, Cyrillic, Greek, Armenian, Hebrew, Arabic, Chinese, Hiragana, Katakana, Korean, Thai and Devanagari are identified and shown in plain terms when the name isn't written in Latin characters.

Up to 50 lines

Paste an entire list, with or without https:// or a path: the tool cleans up each line, converts every name and updates the table as you type.

Nothing is sent

The conversion happens in your browser, without calling any server. The domains you analyse never leave your computer and are never stored.

How it works

Convert a domain to Punycode in four steps

Paste your domains

One domain per line, in readable form such as école.example.com or in technical form such as xn--cole-9oa.example.com. Up to 50 lines.

Read both forms

The table immediately shows the readable form and the Punycode form of each name, part by part, without any button to click.

Look at the check

A green badge indicates a single script. A red badge signals mixed scripts, a blue one a name written in another script.

Copy the result

The copy button puts the chosen form on your clipboard, ready to paste into your DNS zone, your certificate or your report.

Punycode converter: what is Punycode?

DNS, the directory that translates domain names into addresses, was designed for a very limited character set: the letters “a” to “z” without accents, digits and the hyphen. Originally, it was impossible to write école.fr, noël.fr or a name in the Greek, Cyrillic or Chinese script.

To open DNS up to every language without changing it, the IETF defined internationalised domain names (IDNs) and the IDNA standard. The principle is simple: each part of the name that contains non-ASCII characters is converted into a string of letters, digits and hyphens, preceded by the prefix xn--. The algorithm that performs this conversion is called Punycode and it is described in RFC 3492.

So école.example.com becomes xn--cole-9oa.example.com. Your browser shows the readable form in the address bar, but it is the xn-- form that is actually looked up in DNS, written into certificates and passed between mail servers. The Punycode converter lets you switch from one form to the other, in both directions, and see what is hiding behind a name.

The standards involved

The first version of IDNA, published in 2003 in RFC 3490 and 3491, relied on a mapping table that transformed certain characters before the conversion. The current version, IDNA2008, described in RFC 5890 to 5893, instead defines the list of allowed characters and rejects the others. To bridge the two, the Unicode Consortium publishes the UTS #46 recommendation, which most browsers follow. In every case, the Punycode algorithm itself remains the one in RFC 3492: only the rules for preparing the name before the conversion change.

Why convert a domain to Punycode?

As long as everything works, the conversion remains invisible. It becomes essential as soon as you deal with the technical side of an accented domain or investigate a suspicious name:

  • DNS configuration: many zone management interfaces only accept the xn-- form. To create an MX, TXT or CNAME record on an accented domain, you often have to enter its Punycode equivalent.
  • SSL certificates: the name written in a certificate is always the ASCII form. To check that a certificate really covers société.fr, look for xn--socit-esab.fr in the list of names, for example with our SSL certificate checker.
  • Web servers and redirects: configuration files, rewrite rules and access logs use the xn-- form.
  • Logs and email headers: an xn-- domain spotted in a server log or in the headers of a message can be decoded in one click to find out which name it is.
  • Security: showing the technical form of a suspicious link reveals any deceptive characters it may contain.

With or without accents: two separate domains

One point often surprises owners of accented domains: école.fr and ecole.fr are two completely different names, registered separately and possibly owned by two different people. If you choose an accented name, also register its unaccented version and redirect one to the other. Many visitors type addresses without accents, and a lot of older software displays them poorly. For your email addresses, the unaccented version remains the safest.

How to use the Punycode converter

The tool comes down to a single input box. Paste one or more domains, one per line, up to 50 at a time. You can mix both conversion directions:

  • a line in readable form, such as münchen.example.com, is converted to Punycode,
  • a line containing xn--, such as xn--mnchen-3ya.example.com, is decoded into readable form.

There is no need to clean up what you paste: the https:// prefix and everything after the name (path, parameters, anchor) are removed automatically. The result updates as you type, and a copy button comes with each form so you can paste it straight into your DNS interface or configuration.

The conversion takes place entirely in your browser. No name you enter is sent to our servers, which lets you analyse a link received in a dubious message in complete privacy.

How to read the result

The result takes the form of a three-column table:

  • Readable form: the name as a human reads it, with its accents or original characters.
  • Punycode (ASCII): the technical form, the one that DNS and servers see.
  • Check: a badge summing up the analysis of the scripts used.

The badge can take four values. “Single script” in green means that the name only uses Latin characters, accented or not. A blue badge indicates a name written in another script, for example “Cyrillic” or “Greek”. A red “Mixed scripts” badge signals that at least one part of the name combines several scripts, such as Latin and Cyrillic. Finally, “Invalid name” appears when the conversion fails, for example because of a forbidden character or a malformed xn-- code.

école.example.com      xn--cole-9oa.example.com
société.example.com    xn--socit-esab.example.com
пример.example.com     xn--e1afmkfd.example.com

Each label, in other words each part between two dots, is converted separately. Labels that are already ASCII, such as example or com, remain unchanged.

What the algorithm does

Punycode first copies, in order, all the ASCII characters of the label: for école, that gives cole. It then adds a hyphen, followed by a base-36 code that describes which characters to insert and at which position. In xn--cole-9oa, the code 9oa means “insert an é in first position”. When the label contains no ASCII characters, such as пример, there is nothing to copy and the form starts directly with the code.

Homoglyphs: when two domains look exactly alike

Unicode contains thousands of characters, and some are visually identical to others. The Cyrillic “а” and the Latin “a”, the Cyrillic “о” and the Latin “o”, the Greek “ο” and the Latin “o” look the same in most fonts. These are homoglyphs.

A fraudster can therefore register a name that is spelled exactly like a well-known domain, but with one or two letters from another script. To the eye, nothing changes. For DNS, it is a completely different domain:

exаmple.com  (Cyrillic а)   xn--exmple-4nf.com
exеmple.com  (Cyrillic е)   xn--exmple-4of.com

This is known as a homograph attack. The converter highlights it in two ways: the xn-- form immediately gives away the presence of a non-Latin character, and the red “Mixed scripts” badge shows which scripts sit side by side in the same word.

Watch out for a subtler case: a name written entirely in Cyrillic with letters that look Latin. There is then no mixing within the label, but the blue badge shows “Cyrillic” for a name that looks Latin on screen. This mismatch should alert you as much as a red badge.

Recent browsers apply their own rules and often display the xn-- form when a name looks suspicious to them, but these rules vary from one program to another, and email software doesn't always apply them. To go further, our lookalike domain finder searches for variants of your name that are already registered, typos and lookalike characters included.

Good habits when facing a suspicious link

  1. Don't click: hover over the link or long-press it to display the real address.
  2. Copy the domain name and paste it into the Punycode converter.
  3. Look at the Punycode column: an unexpected xn-- on a name that looks ordinary is a strong signal.
  4. Read the badge: red for mixed scripts, blue for a name that isn't Latin.
  5. If in doubt, go to the website by typing the address you know yourself, and report the message to your IT department.

Common pitfalls and mistakes

  • Capital letters: capital letters are converted to lowercase before the conversion. École.fr and école.fr therefore designate the same domain.
  • The German “ß” and a few other characters: depending on the version of the standard applied (IDNA2003 or IDNA2008), the “ß” is either turned into “ss” or kept. Two programs can thus end up with two different domains. Check the form used by your registry.
  • Length: the limit of 63 characters per label and 253 characters for the full name applies to the xn-- form, not the readable form. An accented name therefore uses up more space than it seems.
  • Disallowed characters: spaces, symbols and most punctuation marks are rejected. Each registry also publishes its own list of accepted characters: .fr, for example, accepts the accented letters of French and several European languages, but not every script.
  • Truncated xn-- code: an xn-- copied incorrectly, with one character missing, doesn't decode or gives an absurd name. The tool then shows “Invalid name”.
  • Double hyphen: labels whose third and fourth characters are two hyphens are reserved for prefixes such as xn--. An ordinary name can't be written this way.

Converting a domain from the command line

To automate the conversion or check a result, several command-line tools do the same job. On Linux and macOS, the idn2 utility converts in both directions:

idn2 école.example.com
xn--cole-9oa.example.com

idn2 -d xn--cole-9oa.example.com
école.example.com

Python also offers a built-in codec, handy in a script:

python3 -c "print('école.example.com'.encode('idna'))"
b'xn--cole-9oa.example.com'

To query the DNS of an accented domain, use the Punycode form with dig, for example dig MX xn--cole-9oa.example.com. Our DNS lookup accepts the readable form directly and does the conversion for you. Likewise, the whois lookup gives you the registrar and the creation date of a suspicious xn-- domain.

Punycode, emails and phishing

Email is the favourite playing field of deceptive domains. An email can display a link or a sender address whose readable form looks perfectly legitimate, while its technical form reveals a domain in another script. Before clicking an unexpected link or replying to a sensitive request, paste the domain into the converter: if an xn-- appears where you expected an ordinary name, be wary.

For a message you have already received, the email header analyzer shows the real route taken and the domain that signed the message. On the sending side, if you use an accented domain for your emails, check that its authentication records are published on the correct form with the SPF, DKIM and DMARC checker.

Spotting every deceptive character by eye remains difficult, especially in a busy inbox. Passmundi protection examines the senders and links of every email and blocks phishing and spoofing before they reach you. Discover the email protection plans.

Quick reference

Punycode conversion examples

Readable formPunycodeCheck
école.frxn--cole-9oa.frSingle script
société.frxn--socit-esab.frSingle script
münchen.dexn--mnchen-3ya.deSingle script
пример.comxn--e1afmkfd.comCyrillic only
exаmple.com (Cyrillic а)xn--exmple-4nf.comMixed scripts
example.comexample.comAlready ASCII, unchanged
FAQ

Punycode: all your questions

What is Punycode?

Punycode is the algorithm, described in RFC 3492, that converts a domain name containing accents or characters from another script into a string of ASCII characters accepted by DNS. The resulting form starts with the prefix xn--. For example, école becomes xn--cole-9oa. The Punycode converter performs this conversion in both directions.

What does xn-- mean at the start of a domain name?

The xn-- prefix indicates that the part of the name that follows is encoded in Punycode. Behind it is a name with accents or non-Latin characters. Paste it into the Punycode converter to reveal its readable form and find out which scripts it uses. An xn-- isn't suspicious in itself, it becomes so when it imitates a well-known name.

How do I convert an accented domain name to Punycode?

Paste the name into the converter, one domain per line. The xn-- form appears immediately in the second column, with a button to copy it. You can also use the idn2 command on Linux or macOS, or Python's idna codec. Each part of the name is converted separately, and parts that are already ASCII stay the same.

How do I decode an xn-- domain?

Paste the xn-- domain into the Punycode converter: any line containing this prefix is automatically decoded into readable form. The tool also shows the scripts used, which helps you spot a name that imitates another. On the command line, idn2 -d followed by the name gives the same result.

Can I register a domain name with accents?

Yes. Many extensions accept internationalised names, including .fr for the accented letters of French and several European languages. Each registry sets its own list of allowed characters. Remember to also register the unaccented version, because many visitors will type the name without accents, and redirect one to the other.

Is an xn-- domain dangerous?

Not in itself: it is simply the technical form of an accented name or one written in another script. It becomes suspicious when it mixes scripts within the same word, or when it is written entirely with foreign letters that look Latin. The converter flags both situations with a red or blue badge.

What is a homograph attack?

It is the use of a domain containing characters that are visually identical to those of a legitimate domain, for example a Cyrillic “а” instead of a Latin “a”. On screen, the two names can't be told apart, but for DNS they are two different domains. The aim is to deceive visitors or email recipients.

Why doesn't my accented domain work in my DNS interface?

Many zone management, web server or certificate interfaces only accept the ASCII form. Convert your domain with the Punycode converter, then enter the xn-- form in the interface. Also check that no space or forbidden character has slipped into the name, and that each part stays under 63 characters.

Can I use an accented domain in an email address?

Yes for the domain part: it is converted to Punycode when sent by compatible software. Accented characters before the @ sign, however, require the SMTPUTF8 extension, which not every server supports. To be safe, keep an unaccented address for important exchanges and publish SPF, DKIM and DMARC on the xn-- form of the domain.

What is the difference between IDN, IDNA and Punycode?

IDN refers to an internationalised domain name, in other words one with non-ASCII characters. IDNA is the standard that defines how these names are prepared and validated before entering DNS. Punycode is the conversion algorithm used by IDNA to turn each part of the name into ASCII preceded by xn--.

Is the Punycode converter free?

Yes, it is free, with no sign-up and no practical usage limit. You can convert up to 50 domains at a time, as often as you need. Because the calculation happens in your browser, the tool stays fast even with a long list. It is one of the free tools Passmundi offers around domains and email.

Are the domains I enter sent to your servers?

No. The conversion and script analysis happen entirely in your browser, in JavaScript. No domain name you enter is sent to our servers or stored. You can therefore analyse in complete privacy a link received in a dubious email, a list of client domains or names found in your server logs.

The complete toolbox

All our free tools, in one place

25 free tools, no sign-up needed, to check your email, your domain and your website. Each one gives a clear result and the steps to follow.

Email and deliverability 10

SPF, DKIM and DMARC checkerEmail authentication
Free

An A to F grade for your domain, with the exact fix to publish for each issue.

  • SPF, DKIM and DMARC read and explained
  • DMARC policy and alignment
  • Fixes ready to copy
Open the tool
Domain security auditDomain security
Free

Free domain security check: SPF, DKIM, DMARC, MTA-STS, blacklists, certificate and lookalike domains. Get an A to F grade and fixes ready to copy.

  • A to F grade in 20 to 40 seconds
  • Fixes ready to copy
  • Free weekly monitoring
Open the tool
Email spam testDeliverability
Free

Send a message to a test address and get a score out of 100: authentication, reputation, content.

Open the tool
MX lookupReceiving
Free

Where your mail arrives, in what order, and whether it goes through a filter before your inbox.

Open the tool
DMARC generatorAuthentication
Free

Your DMARC record in one minute, with the right policy to get started safely.

Open the tool
SPF generatorAuthentication
Free

A correct SPF built from your sending services, without exceeding the ten lookup limit.

Open the tool
Email header analyzerInvestigation
Free

Paste a message's headers: route, delays and authentication checks translated into plain English.

Open the tool
MTA-STS, TLS-RPT and BIMIAdvanced security
Free

Encryption enforced between servers, TLS reports, brand logo and DNSSEC in a single test.

Open the tool
Blacklist checkerReputation
Free

Is your IP address or domain on anti-spam lists? Thirteen lists checked.

Open the tool
Email signature generatorBrand image
Free

A professional signature in six steps, compatible with every mail app.

Open the tool

Domains and DNS 6

DNS lookupRecords
Free

All of a domain's records, A, MX, TXT, NS, CAA and the rest, on the resolver of your choice.

  • Every record type
  • A choice of seven public resolvers
  • Explanations for each value
Open the tool
DNS propagationDNS changes
Free

Is a change already visible everywhere? The answer from nineteen resolvers around the world.

Open the tool
Reverse DNS lookup (PTR)IP address
Free

The name associated with an IP address, checked in both directions, just as mail servers do.

Open the tool
Whois and RDAP lookupOwnership
Free

Registrar, creation and expiry dates, name servers and status of a domain or an IP.

Open the tool
Lookalike domain finderSpoofing
Free

Names close to yours that are already registered, which fraudsters could use against your customers.

Open the tool
Punycode converterAccented names
You are here

Accented domains and the xn-- form, in both directions, with detection of misleading characters.

Websites and security 8

Speed testPerformance
Free

An A to F grade, Core Web Vitals, image-by-image loading and advice, on mobile and desktop.

  • Google metrics and server analysis
  • Request waterfall and page weight
  • PDF report to share
Open the tool
Cookie scannerGDPR
Free

Cookies before and after consent, banner, providers and a GDPR register ready to publish.

Open the tool
SSL certificate checkerEncryption
Free

Validity, issuer, chain, names covered and expiry date of a certificate, on any port.

Open the tool
HTTP headers and redirectsWeb server
Free

The redirect chain of an address and the grade of its security headers.

Open the tool
What is my IPNetwork
Free

Your public IP address, IPv4 and IPv6, its name, its operator and its country.

Open the tool
Internet speed testConnection
Free

Download and upload speed, latency and jitter of your connection, measured live in your browser.

Open the tool
IP and CIDR subnet calculatorNetwork
Free

Ranges, masks, subnets and number of addresses of an IPv4 or IPv6 network.

Open the tool
Password generatorSecurity
Free

Strong passwords and passphrases, created in your browser, never sent.

Open the tool

Migration and handy tools 1

Email migrationChanging host
Free

Copy all the messages from one mailbox to another, folders and dates included, without deleting anything.

Open the tool

Fake domains mostly arrive by email

A homoglyph hides easily in a link or a sender address. Passmundi checks the senders and links of every message and blocks phishing before it reaches your inbox.