HTTP/2 Frame Types Reference

All HTTP/2 frame type codes with flags, payload structure and stream context.

Reference for HTTP/2 frame types from RFC 9113: DATA, HEADERS, PRIORITY, RST_STREAM, SETTINGS, PUSH_PROMISE, PING, GOAWAY, WINDOW_UPDATE, CONTINUATION with type code, flags and stream scope.

What is an HTTP/2 frame?

HTTP/2 splits a connection into a binary framing layer. Every message is a sequence of frames, each with a 9-byte header (length, type, flags, stream identifier) followed by a type-specific payload. Frames are multiplexed across streams over a single TCP connection.

What HTTP/2 frames are

HTTP/2 replaces the text protocol of HTTP/1.1 with a binary framing layer. Every exchange is a stream of typed frames multiplexed over one TCP connection. Each frame begins with a fixed 9-byte header — a 24-bit length, an 8-bit type, an 8-bit flags field and a 31-bit stream identifier — followed by a type-specific payload. This reference lists all ten frame types from RFC 9113 with their type code, flags and scope.

How it works

The frame header tells the receiver how to interpret the payload:

+-----------------------------------------------+
| Length (24)                                   |
+---------------+---------------+---------------+
| Type (8)      | Flags (8)     |
+-+-------------+---------------+-------------------------------+
|R| Stream Identifier (31)                                      |
+=+=============================================================+
| Frame Payload (length octets)                               ...
+---------------------------------------------------------------+

Stream id 0 means the frame applies to the whole connection (SETTINGS, PING, GOAWAY). A non-zero id ties the frame to a single request/response stream. Flags like END_STREAM and END_HEADERS mark boundaries; ACK acknowledges SETTINGS and PING.

Tips and notes

  • A new request is a HEADERS frame (optionally with CONTINUATION) opening a fresh, odd-numbered, client-initiated stream id.
  • SETTINGS must be ACKed; never assume a setting is active until the peer’s ACK arrives.
  • WINDOW_UPDATE drives flow control — a stalled stream usually means an exhausted flow window.
  • GOAWAY carries the last processed stream id so the client knows which requests to safely retry on a new connection.