Punycode / IDN Converter
A Punycode / IDN Converter turns an internationalised domain name into the ASCII xn-- form that DNS actually carries, and back again, applying the full UTS #46 processing that browsers apply — entirely in your browser.
Defaults match the URL standard, and therefore the address bar. Unicode 17.0.0.
straße.de
xn--strae-oqa.de
This name has two readings
- IDNA2008 / every current browser
- xn--strae-oqa.de
- IDNA2003 / transitional
- strasse.de
These are two unrelated registrations. Firefox and Safari moved to the IDNA2008 reading in 2016 but Chrome kept the old one until Chrome 110 in 2023, so for seven years the same typed name could open different sites depending on the browser — which is why owners of names like these tend to hold both spellings.
- straße→xn--strae-oqa
Script: Latin. 13 of 63 characters.
- deunchanged
Script: Latin. 2 of 63 characters.
About Punycode / IDN Converter
Punycode on its own is not what turns a Unicode domain into an xn-- label. Browsers run a preprocessing pass first — case folding, compatibility mapping, and Unicode NFC normalisation — and a converter that skips it disagrees with the address bar in ways that look plausible. Type café with a combining accent — the form HFS+ stored every Mac filename in until 2017, and which APFS faithfully preserves on anything copied across — and a naive converter returns xn--cafe-yvc while your browser returns xn--caf-dma: a different domain that resolves somewhere else or nowhere at all. Paste fullwidth example.com and it maps to plain example.com, which is why a host allowlist that punycodes without mapping can be walked straight past. This tool implements UTS #46 properly, including the two contextual rules most implementations omit: CheckBidi, which is why a Hebrew or Arabic label with a Latin letter in it is rejected, and CheckJoiners, which is why the invisible zero-width joiner and non-joiner are only legal where an Indic or Arabic script actually needs them. It also enforces the URL standard's forbidden characters, which UTS #46 does not cover — its table calls space valid, and U+FE70 maps to a space, so without that check you get a domain with a space inside it. You get both directions at once rather than picking one, a character-by-character account of what was mapped, removed or rejected and why, warnings for mixed scripts and Cyrillic lookalikes, and the two different readings of any name containing ß or ς.
What Punycode / IDN Converter does
- Both directions at once — paste Unicode or xn--, get each form
- Full UTS #46 processing: case folding, compatibility mapping, NFC
- CheckBidi and CheckJoiners, the rules most converters skip
- Character-by-character account of every mapping and removal
- Names the real domain a lookalike impersonates — аррӏе.com reads as apple.com
- Catches all-Cyrillic spoofs that mixed-script checks miss, using Unicode's own confusables data
- Warns on labels that mix scripts, the signature of a homograph attack
- Shows both the IDNA2003 and IDNA2008 reading of names containing ß or ς
- Reports invisible characters that mapping silently discards
- Cross-checks the answer against your own browser's IDNA
When to reach for Punycode / IDN Converter
- Checking what a suspicious xn-- domain in an email or log actually says
- Confirming an internationalised domain encodes to the label you registered
- Working out why a Unicode hostname your code accepts is refused by a browser
- Testing whether a host allowlist can be bypassed with fullwidth or mapped characters
How to use Punycode / IDN Converter
- 01
Paste the domain
Either form works. A Unicode name is encoded, an xn-- name is decoded, and both forms are shown side by side — there is no direction to choose.
- 02
Read the ASCII form
This is what DNS carries and what a certificate is issued for. Copy it straight into a registrar form or a config file.
- 03
Check the warnings
Amber warnings are security notes: a label mixing two scripts, a character that renders like an ASCII letter, or an invisible character that was silently removed.
- 04
Open the character breakdown
Switch to 'Character by character' to see the status of every code point and exactly what it was mapped to. This is where a surprising result explains itself.
When to use Punycode / IDN Converter vs alternatives
| Alternative | Use Punycode / IDN Converter when… | Use the alternative when… |
|---|---|---|
| A one-line punycode.toASCII() wrapper | you need the answer to match the address bar. Bare Punycode skips the mapping and normalisation pass, so decomposed accents and fullwidth characters come out as different domains. | you genuinely want raw RFC 3492 with no IDNA preprocessing. |
| Your browser's address bar | you want to know *why* — which character was mapped, which rule rejected the name, and whether it contains a lookalike. | you only need to see whether a name loads. |
| The `idn` command line tool | you want the homograph and mixed-script warnings, and the per-character breakdown, without installing anything. | you are converting names in a shell pipeline. |
Frequently asked questions
Why does this give a different answer than other punycode converters?
What is a homograph attack?
Why is straße.de shown with two different encodings?
Why was my domain rejected when it looks fine?
Can a valid Unicode character still be banned from a domain?
Is it safe to paste a suspicious domain here?
Related tools
Related reading
Engineering · 11 min read
Most punycode converters disagree with your browser. We measured it.
Punycode is only the last step of turning a Unicode domain into an xn-- label, and tools that stop there return a different domain than your address bar does. We tested a bare RFC 3492 implementation against the browser's own IDNA on seventeen realistic names: six came back wrong. Then we measured our own against ICU across 1,112,042 code points.
Security · 10 min read
IDN homograph attacks: how a domain can look exactly like another
A homograph attack registers a domain that renders identically to a real one by swapping in letters from another script — Cyrillic а for Latin a. In 2017 an all-Cyrillic xn--80ak6aa92e.com displayed as apple.com in Chrome, Firefox and Opera. Here is how the attack works, why browsers sometimes show you xn-- instead, and the defences that actually hold.
Related concepts
Punycode
Punycode is the encoding defined by RFC 3492 that represents a Unicode string using only the letters, digits and hyphen that DNS allows, producing the xn-- labels that carry internationalised domain names.
IDN
An IDN (Internationalized Domain Name) is a domain name containing characters outside ASCII, which is carried through DNS as an ASCII xn-- form produced by the IDNA processing defined in UTS #46.
Homograph attack
A homograph attack uses characters that look identical to others — Cyrillic а in place of Latin a — so that a different domain, username or identifier appears to be a trusted one. Browsers defend domain names by showing the xn-- form of names that look suspicious instead of the Unicode spelling.
Unicode normalization
Unicode normalization rewrites text into one standard sequence of code points, so strings that look identical — é stored as a single precomposed character, or as e followed by a combining accent — compare as equal. Unicode defines four normalization forms: NFC, NFD, NFKC and NFKD.