Kafka Protocol Parser & Wire Analyzer

Paste a Kafka request or response frame to inspect its size prefix, header, request context, supported API body, byte ranges, and deterministic diagnostics.

Specification: Apache Kafka Protocol Guide 4.1
Protocol:
Kafka Wire Protocol Lab

Paste application payload bytes. Data is decoded locally in your browser and is not sent to a broker or server.

0 bytes Local-only parsing

Verified examples

What Is the Kafka Wire Protocol?

Apache Kafka uses a size-delimited binary request/response protocol over TCP. Every request identifies an API and API version, includes a correlation ID, and may include a client ID. The parser above maps those values back to their exact byte ranges without connecting to a Kafka broker.

Kafka Frame and Header Format

FieldEncodingPurpose
Frame lengthINT32Bytes following the four-byte length prefix
API key / versionINT16 + INT16Selects the request body schema
Correlation IDINT32Matches a response to its request
Client IDNULLABLE_STRINGIdentifies the client application

Why Kafka Responses Need Request Context

A Kafka response contains its correlation ID but does not repeat the request API key and version. Choose the matching API and version above when decoding an isolated response. The tool never guesses this context; missing context is reported as a diagnostic.

Supported Kafka APIs and Versions

ByteLens decodes framing and request headers for every API. It deeply decodes ApiVersions requests and responses for versions 0–4, Metadata requests for versions 0–12, and Metadata responses for versions 0 and 9. Other bodies remain visible as raw bytes with an explicit unsupported status. Flexible versions use compact fields, unsigned varints, and tagged fields.

Related Protocols

Kafka messages are carried over persistent TCP connections. Inspect the transport header in the TCP packet parser, or compare other application payload formats in the Redis wire protocol parser. Browse every supported decoder in the protocol parser directory.

Kafka Protocol Parser FAQ

Does this tool connect to my Kafka cluster?

No. Parsing happens locally from the bytes you paste and no broker credentials are required.

Can it decode every Kafka API body?

No. The support matrix above is deliberately explicit; unsupported bodies are not guessed.

Specification source: Apache Kafka Protocol Guide 4.1.