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. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

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.

Frame type quick-reference

Type codeNameConnection / StreamPurpose
0x0DATAStreamCarries request or response body bytes
0x1HEADERSStreamHeader block fragment; opens a new stream
0x2PRIORITYStreamStream dependency and weight (deprecated in RFC 9218)
0x3RST_STREAMStreamAbruptly terminates a stream
0x4SETTINGSConnectionExchange configuration parameters
0x5PUSH_PROMISEStreamReserve a stream for a server-initiated push
0x6PINGConnectionRound-trip latency measurement / keepalive
0x7GOAWAYConnectionGraceful shutdown; last processed stream id
0x8WINDOW_UPDATEBothFlow control credit for connection or stream
0x9CONTINUATIONStreamOverflow for a header block too large for one HEADERS frame

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.

Key flags to know

FlagHexUsed onMeaning
END_STREAM0x1DATA, HEADERSNo more frames from this sender on this stream
END_HEADERS0x4HEADERS, CONTINUATION, PUSH_PROMISEHeader block is complete
PADDED0x8DATA, HEADERS, PUSH_PROMISEPadding bytes appended to hide payload length
PRIORITY0x20HEADERSCarries dependency and weight (legacy)
ACK0x1SETTINGS, PINGAcknowledgement

The request/response lifecycle in frames

A typical GET request over HTTP/2 looks like this at the frame level:

  1. Client sends HEADERS (stream 1, END_HEADERS + END_STREAM) — request headers, no body.
  2. Server sends HEADERS (stream 1, END_HEADERS) — response status and headers.
  3. Server sends DATA (stream 1, END_STREAM) — response body.

A POST with a request body adds a DATA frame from the client between steps 1 and 2, with END_STREAM on the last body frame. All streams are multiplexed over the same TCP connection without head-of-line blocking (unlike HTTP/1.1 pipelining).

Tips

  • A new request is a HEADERS frame (optionally with CONTINUATION) opening a fresh, odd-numbered, client-initiated stream id. Server-pushed streams use even ids.
  • SETTINGS must be ACKed; never assume a setting is active until the peer’s ACK arrives. The initial SETTINGS exchange happens immediately after the connection preface.
  • WINDOW_UPDATE drives flow control — a stalled stream almost always means the sender is waiting for a flow-control credit from the receiver.
  • GOAWAY carries the last processed stream id so the client knows which requests to safely retry on a new connection.