NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Punycode Converter API

GET

Convert international domain names and detect writing systems.

Convert between Unicode and Punycode for internationalized domain names (IDN).

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/punycode?text=m%C3%BCnchen.de
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "input": "münchen.de",
    "output": "xn--mnchen-3ya.de",
    "mode": "encode",
    "isIDN": true,
    "isDomain": true,
    "scripts": [
      "Latin"
    ],
    "mixedScript": false
  }
}

About the Punycode Converter API

A Punycode converter for international domain names. Send a Unicode domain such as münchen.de and get the xn-- form that DNS and certificates use, or send an xn-- name and get the readable Unicode back. It is essential for working with international domain names containing non-ASCII characters like accents, Chinese, Arabic, or Cyrillic, whether you are registering domains, validating signup forms or displaying links.

The response also reports which writing systems appear in the non-ASCII labels, and checks for homograph spoofing: labels that mix scripts in a way no real language does, such as a Latin 'a' swapped for a visually identical Cyrillic one. That is the pattern behind look-alike phishing domains, so security tools, email filters and link scanners can flag it before a user clicks.

The Free plan returns the converted output, whether the input was treated as a domain, and the scripts list. Paid plans add isIDN, which says whether the name actually needs Punycode, and mixedScript, the spoofing verdict.

How it works

Conversion follows the Punycode algorithm from RFC 3492. When text contains a dot it is treated as a domain: it is split into labels, and in encode mode only labels with non-ASCII characters are converted and given the xn-- prefix, while plain labels such as de are left alone. In decode mode only labels starting with xn-- are decoded. Without a dot the whole string is converted as a single label. The input is not lower-cased or normalised first, so München and münchen encode differently; normalise input before calling if you need registry-style results.

Invalid Punycode in decode mode, such as digits outside the alphabet, a truncated sequence or a value that is not a character, returns a 400 that names text. isDomain is true when the input contains a dot.

isIDN is true when the Unicode form contains a non-ASCII character or the ASCII form contains an xn-- label, so example.com returns false. scripts lists the writing systems found in labels that contain non-ASCII letters, with digits, hyphens and combining accents ignored. mixedScript is true when any label mixes scripts outside the combinations used by real languages (Japanese Han with Hiragana, Katakana and Latin; Korean Han with Hangul and Latin; Chinese Han with Bopomofo and Latin). It catches Latin-and-Cyrillic style spoofs, not same-script look-alikes such as rn for m. On the Free plan isIDN and mixedScript are null.

What people use it for

Domain Registration
Verify and convert international domain names
Web Development
Handle IDN domains in applications
Email Systems
Process internationalized email addresses
Security
Detect homograph attacks using similar-looking Unicode characters

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

How it compares

Side by side with the tools people weigh Punycode Converter against — what each one is better at, in plain terms.

Other ways to use Punycode Converter

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Punycode Converter API.

Read the docs →
Which writing systems and languages can this convert?
It handles international domain names across major writing systems, including Cyrillic, Greek, Han, Arabic, and Latin with accents. Both encoding Unicode text to xn-- Punycode and decoding Punycode back to readable Unicode are supported for text inputs up to 1,000 characters.
How many domain conversions does the Free plan cover?
The Free plan covers 200 domain conversions each month at 1 credit per call. If you need higher volume, the Starter plan covers 200,000 conversions monthly, which works out to about $0.15 per 1,000 calls or $0.00015 per call.
Do I get mixed-script spoof detection on the Free plan?
No, the mixed-script flag and the internationalized domain validation flag are premium fields reserved for paid plans. Upgrading to Starter or above unlocks both fields so you can verify valid IDNs and detect when a domain mixes conflicting alphabets to mimic another site.
What happens if I pass a standard ASCII domain?
Standard ASCII domains pass through without errors. Because there are no internationalized characters, the scripts list returns empty and, on paid plans, the mixed-script indicator returns false.
How does the converter identify look-alike phishing domains?
Punycode Converter analyzes each label in a domain to see if it mixes distinct alphabets that no natural language combines, such as swapping a Latin letter for a visually identical Cyrillic character. On paid plans, when this pattern occurs, the mixedScript field flags the domain as a potential spoof.

Ready to build with Punycode Converter? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs