# Punycode Domain Converter (Encode/Decode)

> Punycode Domain Converter (Encode/Decode) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts internationalized domain names (IDN) to Punycode/ASCII-compatible encoding (RFC 3492) or decodes Punycode back to Unicode, using Node.js built-in IDNA support.

## Facts

- Endpoint: POST https://agent402.tools/api/punycode-convert
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/punycode-domain-converter-encode-decode-a39f256f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aFIU5yEU-aJgNkjElEd0H

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability punycode-domain-converter-encode-decode-a39f256f -d '<json body>'
```

Example prompt: Convert the domain münchen.de to its Punycode ASCII-compatible encoding so I can use it in DNS records.

## When to prefer this

Use this endpoint when you need a deterministic, RFC 3492-compliant conversion between internationalized Unicode domain names and their Punycode ASCII-compatible encoding — especially useful for DNS configuration, email routing, or validating IDN domains without setting up a local IDNA library.

## Known failure modes

- Invalid domain name format returns an error
- Passing an already-ASCII domain for encoding may return it unchanged or error
- Passing a non-Punycode string for decoding may produce unexpected results
- Empty or missing domain field returns a validation error
- Payment failure (402) if USDC balance is insufficient

## How this service works

Convert an internationalized domain name to Punycode (ASCII-compatible encoding, RFC 3492) or decode Punycode back to Unicode. Uses Node.js built-in IDNA support. Deterministic, pure CPU.

## Output

Returns the converted domain name — either the Punycode/ACE (xn--) encoded ASCII version of a Unicode domain, or the decoded Unicode version of a Punycode domain, depending on the decode flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "decode": {
   "type": "boolean",
   "description": "If true, decode from Punycode to Unicode (default: false)"
  },
  "domain": {
   "type": "string",
   "description": "Domain name to encode (Unicode) or decode (Punycode)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "encode",
  "labels": [
   "xn--mnchen-3ya",
   "de"
  ],
  "result": "xn--mnchen-3ya.de",
  "original": "münchen.de"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/punycode-domain-converter-encode-decode-a39f256f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
