POSThttps://api.deepinfo.com/v1/tools/punycode-converter

Converts each non-empty line between unicode and punycode. target picks the direction: punycode turns müşteri.example.com into xn--mteri-kva70e.example.com, unicode turns it back. Both directions match the IDNA conversion a standard library does (checked against Python's, 2026-10-08).

For a line starting with http:// or https:// only the host name is converted; a name that is already in the target form is returned unchanged.

A line that cannot be converted does not fail the request, although the spec says it does: the response is 200 and that line comes back as an empty string, in place, so results stays aligned with the input lines. Check for empty entries. (Measured 2026-10-08 with the line xn--.)

Authentication

Send your API key in the apikey request header.

Request Body

ParameterTypeRequiredDescription
targetstringRequired
Conversion direction: punycode converts unicode to punycode, unicode converts punycode to unicode. One of punycode, unicode
textstringRequired
Text holding one domain or URL per line. Limited to 1,000,000 characters and 10,000 lines.
application/json
{
  "text": "müşteri.example.com\nhttps://örnek.example.org/path\nwww.example.com",
  "target": "punycode"
}

Response Fields

FieldTypeDescription
resultsarray of string
The records on this page, with the results[].* fields below.

Response Schema

FieldTypePresentExample
resultsarray<string>2 of 2"xn--mteri-kva70e.example.com"

Examples

Saved examples from the Deepinfo API. Selecting one loads it into the request and response panels.

Reference updated