Visual RFC.
ALL RFCs / RFC 6455
Read the RFC ↗
RFC 6455 / EXCHANGE MESSAGES

Frame fields

03

FIN, opcode, mask state, length, and optional masking key let the receiver interpret one frame.

RFC 6455 · § 5.2EXAMPLE
3 / 3
03
Interpret the frame content.

In this illustrated client text frame, unmask five bytes to recover Hello.

Frame fieldsA client frame progressively reveals FIN/opcode, mask and length fields, its masking key, and the recovered five-byte text payload.Anatomy of one client text frameIllustrative field grouping, not bit-width scaleFIN1RSV000opcode0x1MASK1length5MASK=1: four key bytes follow32-bit masking key: 37 FA 21 3DHelloFive recovered UTF-8 bytes form the payloadUnmask and interpret the text payload

Key idea: Read control fields before interpreting the payload.

Terms

Look up a term in the glossary ↗

Rules & examples
  • FIN marks the final fragment; opcode identifies continuation, text, binary, or a control frame. Reserved bits are zero unless an extension defines them.
  • Payload lengths 0–125 fit directly; 126 and 127 introduce extended-length fields. The high bit of a 64-bit length must be zero.
  • Client-to-server frames set MASK and carry a 32-bit masking key; server-to-client frames are not masked.

A single message can span multiple frames. Payload length includes extension data when extensions add it; implementations should impose appropriate resource limits.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 6455

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗