Encoding Utilities

Punycode Decode

Converts Punycode-encoded domain names back to their Unicode representation. Use via MCP in Cursor or Windsurf, or hit GET /v1/encode/punycode/decode with your encoded string. Perfect for reversing internationalized domain names like "xn--nxasmq6b" back to "中国.com". Returns clean Unicode text that browsers and applications can display properly.

API Endpoint

GET /v1/encode/punycode/decode

Code Examples

curl "https://tinyfn.io/v1/encode/punycode/decode" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/encode/punycode/decode', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/encode/punycode/decode',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's encoding tools:

{
  "mcpServers": {
    "tinyfn-encoding": {
      "url": "https://tinyfn.io/mcp/encoding",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What is Punycode and why would I need to decode it?

Punycode encodes Unicode domain names into ASCII format for DNS compatibility. You decode it to see the original internationalized characters like emoji or foreign scripts.

How do I decode Punycode using MCP in my AI coding assistant?

Call the punycode_decode tool with your encoded string. Works in Cursor, Claude Code, Copilot, and other MCP-enabled editors for instant Unicode conversion.

Can I decode multiple Punycode strings at once?

The tool processes one string per request. For batch operations, make multiple API calls or use the MCP tool repeatedly in your workflow.

What happens if I try to decode invalid Punycode?

Invalid Punycode returns an error response. The decoder follows RFC 3492 strictly and won't attempt to guess malformed input.

Does this handle both domain names and regular Punycode text?

Yes, it decodes any valid Punycode string whether it's a domain name, email address, or standalone encoded text following the Punycode specification.

Try Punycode Decode Now

Get your free API key and start using Punycode Decode in seconds.

Get Free API Key