USB Packet Utility

USB Packet Decoder

Decode raw USB packet bytes and inspect PID validity, packet category, token device address, endpoint number, SOF frame number, data payload, CRC fields and handshake meaning for common USB 2.0 packet types.

✓ Token Packets ✓ DATA0 / DATA1 ✓ ACK / NAK / STALL ✓ SOF ✓ CRC Fields
PKT
USB Packet Decode
● Ready
Do not include SYNC, NRZI symbols or host-controller metadata.
Token/SOF packets use CRC5. Data packets use CRC16.
Enter hexadecimal bytes separated by spaces, commas, colons or hyphens. Continuous hexadecimal input and 0x-prefixed bytes are accepted.
Packet model: this decoder expects the packet beginning with the USB PID byte. A physical USB transmission also includes synchronization, line coding, bit stuffing and end-of-packet signaling that are normally removed before software presents packet bytes.
USB Packet Decode Result Decoded
Decoded Packet
PID
Packet Type
PID Check
Device Address
Endpoint
Frame Number
Payload
Payload Bytes
Received CRC
CRC Status
Total Packet Bytes
Meaning
Byte-Level Decode Breakdown

What Is a USB Packet Decoder?

A USB Packet Decoder converts packet-level hexadecimal bytes into the fields defined by the USB protocol. The first byte is the Packet Identifier, or PID, which determines whether the packet is a token, data, handshake or special packet.

The packet format after the PID depends on that category. Token packets carry device and endpoint addressing, data packets carry payload bytes and CRC16, handshake packets usually contain only the PID, and Start-of-Frame packets carry an 11-bit frame number plus CRC5.

USB PID Byte

A USB PID byte contains a four-bit packet identifier and the one’s complement of that nibble. The complement provides a simple integrity check on the PID itself.

PID byte: 0x69 Low nibble: 0x9 High nibble: 0x6 ~0x9 & 0x0F: 0x6 PID complement: VALID

Common USB Packet IDs

PID Byte Packet Category
0xE1OUTToken
0x69INToken
0x2DSETUPToken
0xA5SOFToken / SOF
0xC3DATA0Data
0x4BDATA1Data
0x87DATA2Data
0x0FMDATAData
0xD2ACKHandshake
0x5ANAKHandshake
0x1ESTALLHandshake
0x96NYETHandshake

USB Token Packet Format

PID + 7-bit Device Address + 4-bit Endpoint Number + CRC5

The address, endpoint and CRC bits occupy two bytes following the PID. The fields are packed at the bit level rather than stored as separate whole bytes.

USB IN, OUT and SETUP Tokens

An OUT token tells the selected device and endpoint that the host intends to send data. An IN token requests data from a device endpoint. A SETUP token is used to begin a control transfer’s setup stage.

The token itself does not carry the setup request or application payload. That information arrives in a following DATA packet.

USB Data Packet Format

PID + 0 to N payload bytes + 16-bit CRC

USB data packets include DATA0, DATA1 and, for applicable higher-speed transactions, additional DATA PIDs such as DATA2 and MDATA. The data-toggle mechanism helps the endpoints distinguish new packets from retransmissions.

USB Handshake Packets

Handshake packets communicate transaction status and normally consist of only a PID byte.

ACK Transaction accepted successfully NAK Endpoint temporarily cannot complete the transfer STALL Endpoint is halted or request is unsupported NYET High-speed transaction response indicating not yet ready

USB SOF Packet

A Start-of-Frame packet carries an 11-bit frame number and a five-bit CRC. Hosts transmit SOF timing packets periodically on supported USB buses.

SOF packet: PID 11-bit Frame Number 5-bit CRC

USB Token Address and Endpoint Packing

The two token bytes after the PID form a 16-bit little-endian bit field. The lowest seven bits contain the USB device address and the following four bits contain the endpoint number.

tokenWord = byte1 | (byte2 << 8) Address = tokenWord & 0x7F Endpoint = (tokenWord >> 7) & 0x0F CRC5 = (tokenWord >> 11) & 0x1F

USB CRC5 and CRC16

USB uses CRC5 for token and SOF protection and CRC16 for data packets. This calculator can display the received CRC and optionally calculate the expected CRC from the decoded packet fields or data payload.

CRC checking is useful when working with raw packet captures, but many USB analyzers or host-controller interfaces already validate CRC in hardware and may not expose the received CRC bytes.

USB Packet vs USB Descriptor

A USB packet is a low-level bus transaction unit. A USB descriptor is a structured block of device information transferred within control-transfer data stages. They are related but are not the same format.

USB packet layer: SETUP → DATA0 → ACK Descriptor/application layer: Device Descriptor bytes carried inside DATA packet(s)

USB Packet Decoder FAQs

What is a USB PID?
PID means Packet Identifier. It determines the packet category and exact packet meaning.
Why does a USB PID contain complemented bits?
The upper four bits are the complement of the lower four bits, allowing the receiver to detect many PID-bit errors.
What does USB PID 0x69 mean?
0x69 is the standard USB IN token PID.
What does PID 0xE1 mean?
It identifies an OUT token.
What does PID 0x2D mean?
It identifies a SETUP token used during control transfers.
What is DATA0?
DATA0 is one of the USB data packet identifiers used as part of the data-toggle protocol.
What does ACK mean in USB?
ACK indicates successful reception or completion of the relevant transaction stage.
What does NAK mean?
NAK typically means the endpoint is temporarily unable to provide or accept the requested data.
What does STALL mean?
STALL indicates the endpoint is halted or cannot support the requested operation.
Does this input include USB SYNC?
No. Input begins with the PID byte. Physical-layer synchronization and line coding are not part of the byte sequence expected here.
Can this decode USB descriptors?
Packet decoding and descriptor decoding are separate tasks. A descriptor may appear as payload inside one or more USB data packets.

Decode USB Packet Hex Bytes

Inspect USB PIDs, token addressing, endpoint numbers, SOF frames, data payloads, handshake responses and CRC fields from raw packet-level USB hexadecimal data.

Scroll to Top