DNS Message Decoder

Paste the hex bytes of a DNS query or response and read the header, the question and every record: names are decompressed, and A, AAAA, CNAME, NS, PTR, MX, TXT, SOA, SRV, CAA and EDNS0 OPT data is rendered field by field.

Twelve bytes or more. Spaces, colons, commas, 0x prefixes and dump offset labels are ignored, so a capture line, a tcpdump -x line or a hex dump pastes straight in.

The decoded header
Transaction ID
Flags
Opcode
Response code
Counts
EDNS0
Question section
NameTypeClass
Answer, authority and additional records
SectionNameTTLClassTypeData

The message is read at the offsets RFC 1035 gives it: a 16-bit transaction ID, a 16-bit flags word, four 16-bit section counts, then the question and the answer, authority and additional records, each with a name, type, class, TTL and length-prefixed data. Names are read label by label and followed through compression pointers that must point to an earlier byte, so a loop or a forward pointer is refused instead of hanging the page. Types and their names come from the IANA DNS parameters registry: A, AAAA, CNAME, NS, PTR, MX, TXT, SOA, SRV, CAA and the EDNS0 OPT pseudo-record are decoded field by field, while other types are shown as raw hex because their structure is not interpreted here. DNSSEC signature records are not validated and no DNS query is made. Everything runs in your browser; nothing is sent anywhere.