{"uid":"cap_KcPg_-ABInHa-1oSXNY2H","slug":"duo-data-utilities-idn-converter-idna2008-validator-71f568af","name":"Duo Data Utilities – IDN Converter & IDNA2008 Validator","description":"Convert internationalised domain names between Unicode and ASCII punycode in either direction, label by label, and validate each label against IDNA2008: length, leading and trailing hyphens, the hyphen-hyphen rule at positions 3 and 4, disallowed code points and bidirectional rules. Returns both forms, the per-label breakdown and the first rule violated. Strict mode is IDNA2008 (UTS 46 non-transitional); it may reject names /v1/code/url displays.","url":"https://api.duoleads.com/v1/code/idn?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["domain"],"properties":{"to":{"enum":["ascii","unicode","both"],"type":"string","default":"both","maxLength":64,"description":"ascii, unicode or both (default). Validated only: the response always carries both forms."},"domain":{"type":"string","maxLength":512,"description":"Domain name in Unicode or punycode form."},"strict":{"enum":["true","false"],"type":"string","default":"true","maxLength":64,"description":"true (default) applies IDNA2008 strictly; false uses UTS 46 transitional (IDNA2003-compatible) processing, which maps e.g. ß to ss; current browsers and /v1/code/url use non-transitional processing, so its output can differ from them."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","route","version","data","meta"],"properties":{"ok":{"const":true},"data":{"type":"object","required":["ascii","unicode","valid","labels","reason","total_length"],"properties":{"ascii":{"type":["string","null"]},"valid":{"type":"boolean"},"labels":{"type":"array","items":{"type":"object","required":["index","unicode","ascii","length","punycoded","valid","reason"],"properties":{"ascii":{"type":["string","null"]},"index":{"type":"integer"},"valid":{"type":"boolean"},"length":{"type":["integer","null"]},"reason":{"type":["string","null"]},"unicode":{"type":"string"},"punycoded":{"type":"boolean"}}}},"reason":{"type":["string","null"]},"unicode":{"type":["string","null"]},"total_length":{"type":["integer","null"]}}},"meta":{"type":"object","required":["request_id","computed_at","price_usd","deterministic","disclaimer"],"properties":{"sources":{"type":"array","items":{"type":"object","required":["id","version","published"]}},"price_usd":{"type":"string"},"disclaimer":{"type":"string"},"request_id":{"type":"string"},"computed_at":{"type":"string","description":"RFC 3339 UTC with milliseconds"},"deterministic":{"type":"boolean"}}},"route":{"const":"/v1/code/idn"},"version":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"ascii":"xn--bcher-kva.example","valid":true,"labels":[{"ascii":"xn--bcher-kva","index":0,"valid":true,"length":13,"reason":null,"unicode":"bücher","punycoded":true},{"ascii":"example","index":1,"valid":true,"length":7,"reason":null,"unicode":"example","punycoded":false}],"reason":null,"unicode":"bücher.example","total_length":21},"meta":{"sources":[{"id":"unicode-idna-tables","licence":"Unicode License v3","version":"tr46 6.0.0 (UTS #46 IdnaMappingTable)","published":"2026-09-29","attribution":"Unicode IdnaMappingTable via the tr46 package (MIT); (c) Unicode, Inc."}],"price_usd":"0.05","disclaimer":"Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms","request_id":"01K6B7Q4ZC8H3F2M9WXR5TYN0D","computed_at":"2026-09-28T12:00:00.000Z","deterministic":true},"route":"/v1/code/idn","version":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__gbObpWXYCgzhcr_mU8TQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts internationalised domain names between Unicode and ASCII punycode, validates each label against IDNA2008 rules, and returns both forms with a per-label breakdown and the first rule violated.","exampleAgentPrompt":"Can you convert 'bücher.example' to its ASCII punycode form and validate each label against IDNA2008 rules, giving me both the unicode and ASCII versions?","exampleUseCases":[{"title":"Validate internationalised domain before registration","prompt":"I'm about to register the domain 'münchen.de' — can you validate it against IDNA2008 and show me both the unicode and punycode forms, plus flag any rule violations?"},{"title":"Decode punycode domain for display","prompt":"I have the punycode domain 'xn--bcher-kva.example' and I need to show it in human-readable unicode form — can you decode it and validate each label?"},{"title":"Audit IDN compliance for a list of domains","prompt":"Check whether 'café.com' is IDNA2008 compliant in strict mode and give me a label-by-label breakdown showing the ASCII and unicode versions of each part."}],"resultDescription":"Returns a JSON object with the ASCII punycode form, Unicode form, overall validity flag, total label length, and an array of per-label objects each containing the ascii and unicode representations, label index, length, punycoded flag, validity, and the first IDNA rule reason violated (or null if valid). Metadata includes request ID, computation timestamp, price, and attribution to the Unicode IDNA mapping table.","failureModes":["Missing required 'domain' query parameter returns a validation error","Domain label exceeds 63 characters returns invalid with length violation reason","Domain contains disallowed code points returns invalid with the specific IDNA2008 violation","Hyphen at positions 3 and 4 of a label triggers hyphen-hyphen rule violation","Bidirectional rule violation returns invalid with bidi reason","Strict IDNA2008 mode may reject labels that UTS 46 transitional mode would accept (e.g. ß)","Malformed punycode input may return a parse error or invalid result"],"whenToPreferThis":"Choose this endpoint when you need to convert between Unicode and punycode domain representations, validate IDN labels against IDNA2008 (strict) or UTS 46 transitional rules, or get a per-label breakdown of IDNA compliance. Prefer this over generic string utilities because it specifically handles the IDNA2008 standard, the Public Suffix List is handled by a sibling endpoint, and it supports both directions of conversion plus detailed rule-violation reporting in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T03:44:03.157Z","isFirstParty":false,"canonicalSlug":"duo-data-utilities-idn-converter-idna2008-validator-71f568af"}