{"id":"dns-rdata-decode","version":"1.0.0","description":"Decode DNS RDATA hex for A, AAAA, NS, CNAME, PTR, MX, TXT, SOA, SRV, or unknown.","supported_operations":["decode dns rdata hex","dns wire rdata to record fields","parse uncompressed dns rdata octets","read dns a aaaa mx txt soa srv wire","decode a dns resource record rdata","turn dns rdata octets into fields","פענוח נתוני רשומת דיאן אס"],"unsupported_operations":["query DNS or resolve a hostname","follow a compression pointer into a DNS message","verify DNSSEC signatures or check TTLs","parse a DNS message header or question section"],"semantics":["Input is an explicit rr_type_code and rr_class_code plus lowercase even-length rdata_hex. The nine structured types are parsed; every other code, including codes absent from the pinned excerpt, returns the same hex with wire_known false.","A name is counted from its own first octet. The wire form must be uncompressed and at most 255 octets (RFC 1035 sections 2.3.4 and 3.1). 256 or 257 octets is invalid_input, including a name that begins after the MX preference or the SRV priority, weight and port.","A compression pointer (top bits 11) or a reserved label type (top bits 01 or 10) is invalid_input. This codec has no message to resolve pointers against.","A is 4 octets emitted as canonical dotted decimal. AAAA is 16 octets emitted as RFC 5952 lowercase text, with the leftmost longest run of at least two zero groups compressed, and without a dotted IPv4 tail.","TXT is one or more character-strings. Printable ASCII other than backslash is emitted as text; every other octet is \\DDD, and backslash is \\\\. A known type that does not consume the hex exactly is invalid_input.","When the code is in the pinned excerpt, rr_type or rr_class is that canonical mnemonic (* for 255). Otherwise the name is null. data_version is iana-dns-parameters-2026-10-21.","No DNS query is sent. More than 262144 UTF-8 bytes of JSON input, or more than 65535 RDATA octets, is limit_exceeded before parsing.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_input_bytes":262144,"max_rdata_bytes":65535},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["rr_type_code","rr_class_code","rdata_hex"],"properties":{"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"rdata_hex":{"type":"string","minLength":0,"maxLength":131070,"pattern":"^([0-9a-f]{2})*$"}}},"output_schema":{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"type":["string","null"],"minLength":1,"maxLength":12},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"type":"boolean"},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"ipv4":{"type":"string","minLength":7,"maxLength":15},"ipv6":{"type":"string","minLength":2,"maxLength":39},"domain_name":{"type":"string","minLength":1,"maxLength":2048},"preference":{"type":"integer","minimum":0,"maximum":65535},"exchange":{"type":"string","minLength":1,"maxLength":2048},"txt_chunks":{"type":"array","minItems":1,"maxItems":4096,"items":{"type":"string","minLength":0,"maxLength":2048}},"mname":{"type":"string","minLength":1,"maxLength":2048},"rname":{"type":"string","minLength":1,"maxLength":2048},"serial":{"type":"integer","minimum":0,"maximum":4294967295},"refresh":{"type":"integer","minimum":0,"maximum":4294967295},"retry":{"type":"integer","minimum":0,"maximum":4294967295},"expire":{"type":"integer","minimum":0,"maximum":4294967295},"minimum":{"type":"integer","minimum":0,"maximum":4294967295},"priority":{"type":"integer","minimum":0,"maximum":65535},"weight":{"type":"integer","minimum":0,"maximum":65535},"port":{"type":"integer","minimum":0,"maximum":65535},"target":{"type":"string","minLength":1,"maxLength":2048},"rdata_hex":{"type":"string","minLength":0,"maxLength":131070,"pattern":"^([0-9a-f]{2})*$"}},"oneOf":[{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","ipv4"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"A"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"ipv4":{"type":"string","minLength":7,"maxLength":15}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","ipv6"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"AAAA"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"ipv6":{"type":"string","minLength":2,"maxLength":39}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","domain_name"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"NS"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"domain_name":{"type":"string","minLength":1,"maxLength":2048}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","domain_name"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"CNAME"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"domain_name":{"type":"string","minLength":1,"maxLength":2048}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","domain_name"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"PTR"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"domain_name":{"type":"string","minLength":1,"maxLength":2048}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","preference","exchange"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"MX"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"preference":{"type":"integer","minimum":0,"maximum":65535},"exchange":{"type":"string","minLength":1,"maxLength":2048}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","txt_chunks"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"TXT"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"txt_chunks":{"type":"array","minItems":1,"maxItems":4096,"items":{"type":"string","minLength":0,"maxLength":2048}}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","mname","rname","serial","refresh","retry","expire","minimum"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"SOA"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"mname":{"type":"string","minLength":1,"maxLength":2048},"rname":{"type":"string","minLength":1,"maxLength":2048},"serial":{"type":"integer","minimum":0,"maximum":4294967295},"refresh":{"type":"integer","minimum":0,"maximum":4294967295},"retry":{"type":"integer","minimum":0,"maximum":4294967295},"expire":{"type":"integer","minimum":0,"maximum":4294967295},"minimum":{"type":"integer","minimum":0,"maximum":4294967295}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","priority","weight","port","target"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"const":"SRV"},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":true},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"priority":{"type":"integer","minimum":0,"maximum":65535},"weight":{"type":"integer","minimum":0,"maximum":65535},"port":{"type":"integer","minimum":0,"maximum":65535},"target":{"type":"string","minLength":1,"maxLength":2048}}},{"type":"object","additionalProperties":false,"required":["data_version","rr_type","rr_type_code","rr_class","rr_class_code","wire_known","rdata_length","rdata_hex"],"properties":{"data_version":{"type":"string","const":"iana-dns-parameters-2026-10-21"},"rr_type":{"type":["string","null"],"minLength":1,"maxLength":12},"rr_type_code":{"type":"integer","minimum":0,"maximum":65535},"rr_class":{"type":["string","null"],"minLength":1,"maxLength":4},"rr_class_code":{"type":"integer","minimum":0,"maximum":65535},"wire_known":{"const":false},"rdata_length":{"type":"integer","minimum":0,"maximum":65535},"rdata_hex":{"type":"string","minLength":0,"maxLength":131070,"pattern":"^([0-9a-f]{2})*$"}}}]},"examples":[{"input":{"rr_type_code":1,"rr_class_code":1,"rdata_hex":"c0000201"},"output":{"data_version":"iana-dns-parameters-2026-10-21","rr_type":"A","rr_type_code":1,"rr_class":"IN","rr_class_code":1,"wire_known":true,"rdata_length":4,"ipv4":"192.0.2.1"}},{"input":{"rr_type_code":16,"rr_class_code":3,"rdata_hex":"026869"},"output":{"data_version":"iana-dns-parameters-2026-10-21","rr_type":"TXT","rr_type_code":16,"rr_class":"CH","rr_class_code":3,"wire_known":true,"rdata_length":3,"txt_chunks":["hi"]}}],"execute_url":"/v1/tools/dns-rdata-decode/versions/1.0.0/execute"}