USB Descriptor Decoder
Decode hexadecimal USB descriptors into human-readable fields. Inspect USB device, configuration, interface, endpoint, string, HID, BOS and device capability descriptor structures with descriptor lengths, types, addresses, attributes, VID/PID values and byte-level details.
| # | Offset | bLength | bDescriptorType | Descriptor | Decoded Summary |
|---|
—
What Is a USB Descriptor Decoder?
A USB Descriptor Decoder converts raw descriptor bytes into fields defined by the USB specification. USB devices expose descriptors during enumeration so the host can learn what device is connected, which configurations are available, which interfaces exist and which endpoints can transfer data.
Every standard descriptor begins with a length byte and descriptor-type byte, which makes it possible to walk through a sequence of descriptors without assuming every descriptor has the same size.
USB Descriptor Header
Byte 0:
bLength
Byte 1:
bDescriptorType
Remaining bytes:
Descriptor-specific fields
For example, a standard USB device descriptor normally begins with
12 01. Hexadecimal 0x12 means the descriptor is
18 bytes long, while descriptor type 0x01 identifies a Device
Descriptor.
Common USB Descriptor Types
| Type | Descriptor |
|---|---|
| 0x01 | Device |
| 0x02 | Configuration |
| 0x03 | String |
| 0x04 | Interface |
| 0x05 | Endpoint |
| 0x06 | Device Qualifier |
| 0x07 | Other-Speed Configuration |
| 0x08 | Interface Power |
| 0x09 | OTG |
| 0x0B | Interface Association |
| 0x0F | BOS |
| 0x10 | Device Capability |
| 0x21 | HID class descriptor in HID context |
USB Device Descriptor
The device descriptor contains information applying to the overall device, including the supported USB version, device class, endpoint-zero packet size, vendor ID, product ID and string-descriptor indexes.
12 01
00 02
00 00 00
40
34 12
78 56
00 01
01 02 03
01
The two-byte fields are stored little-endian. Therefore raw VID bytes
34 12 represent vendor ID 0x1234, while
78 56 represent product ID 0x5678.
USB Configuration Descriptor
A configuration descriptor describes one device configuration and includes the total number of bytes returned for that configuration tree, the number of interfaces, configuration attributes and maximum bus current.
bLength
bDescriptorType
wTotalLength
bNumInterfaces
bConfigurationValue
iConfiguration
bmAttributes
bMaxPower
For USB 2.0-style configuration descriptors, bMaxPower is
expressed in units of 2 mA.
USB Interface Descriptor
An interface represents a functional portion of a USB configuration. It defines an interface number, alternate setting, expected endpoint count and class/subclass/protocol values.
09 04 00 00 01 03 01 01 00
bInterfaceNumber = 0
bAlternateSetting = 0
bNumEndpoints = 1
bInterfaceClass = 0x03
Class 0x03 is commonly associated with HID, but the decoder
continues to display numeric class fields so that the raw descriptor remains
visible.
USB Endpoint Descriptor
Endpoint descriptors describe non-control endpoints used to exchange data. Important fields include the endpoint address, transfer type, maximum packet size and polling interval.
07 05 81 03 08 00 0A
Endpoint Address:
0x81
Direction:
IN
Endpoint Number:
1
Attributes:
0x03
Transfer Type:
Interrupt
Maximum Packet:
8 bytes
Interval:
10Endpoint Address Direction
Bit 7 of bEndpointAddress indicates transfer direction for
non-control endpoints.
0x81
Bit 7 = 1
Direction = IN
Endpoint number:
0x81 & 0x0F
= 1IN means transfers move from the USB device toward the host. OUT means data travels from the host toward the device.
USB Endpoint Transfer Types
| bmAttributes Bits 1:0 | Transfer Type |
|---|---|
| 0 | Control |
| 1 | Isochronous |
| 2 | Bulk |
| 3 | Interrupt |
USB String Descriptor
USB string descriptors commonly store text using UTF-16LE. After the
bLength and bDescriptorType bytes, each character
occupies two bytes.
0E 03
42 00
69 00
6E 00
61 00
72 00
79 00
Decoded:
"Binary"String descriptor zero is special because its payload normally contains language IDs rather than ordinary text.
USB HID Descriptor
A HID class descriptor commonly appears after a HID interface descriptor.
Its descriptor type is 0x21 and it can contain the HID
specification version, country code and subordinate descriptor information.
The HID report descriptor itself uses a different variable-item grammar, so a USB descriptor stream parser should not blindly interpret its payload as ordinary fixed-format USB descriptors.
USB BOS Descriptor
The Binary Object Store, or BOS, groups device capability descriptors. It is used by newer USB specifications to advertise additional device-level capabilities.
BOS Descriptor Type:
0x0F
Device Capability Descriptor Type:
0x10Device capability payload interpretation depends on the capability type, so unknown capability data is preserved instead of guessed.
Little-Endian USB Fields
Many multi-byte numeric fields in USB descriptors are transmitted little-endian.
Raw bytes:
34 12
16-bit value:
0x1234
This applies to common fields such as bcdUSB,
idVendor, idProduct,
wTotalLength and wMaxPacketSize.
USB Descriptor Decoder FAQs
What does bLength mean in a USB descriptor?
What does bDescriptorType identify?
What does USB descriptor type 0x01 mean?
What does descriptor type 0x02 mean?
What does descriptor type 0x04 mean?
What does descriptor type 0x05 mean?
How are USB vendor and product IDs stored?
What does endpoint address 0x81 mean?
What does endpoint attribute 0x03 mean?
How are USB strings encoded?
Can this decoder parse multiple descriptors together?
What happens with vendor-specific descriptors?
Decode USB Descriptor Hex Bytes
Inspect descriptor boundaries, USB versions, VID/PID values, configuration properties, interfaces, endpoint direction and transfer type, strings, HID metadata and other USB descriptor structures.