WebSocket Frame Parser

Paste a WebSocket frame as base64 or hex and decode it field by field — FIN, the RSV bits, the opcode (text/binary/close/ping/pong), the mask flag and key, the payload length, and the unmasked payload as hex and UTF-8 text. RFC 6455. Runs entirely in your browser, no server, no sign-up.

Decoded frame

What this tool does

A WebSocket message is carried on the wire as one or more frames, defined by RFC 6455. Each frame packs a lot into its first two bytes: a FIN bit, three reserved bits, a 4-bit opcode, a mask flag, and a payload length — followed (when the frame is masked) by a 4-byte masking key and the masked payload.

Paste a single frame as base64 or hex and this tool decodes every header field and unmasks the payload for you, showing it as both hex and — for text frames — UTF-8 text. Everything runs locally in your browser; the bytes you paste never leave your device.

The WebSocket frame layout

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-------+-+-------------+-------------------------------+
|F|R|R|R| opcode|M| Payload len |    Extended payload length    |
|I|S|S|S|  (4)  |A|     (7)     |             (16/64)           |
|N|V|V|V|       |S|             |   (if payload len==126/127)   |
+-+-+-+-+-------+-+-------------+-------------------------------+
|     Masking-key (if MASK set) |          Payload Data ...     |
+-------------------------------+-------------------------------+

Opcodes

opcodemeaning
0x0continuation
0x1text (UTF-8)
0x2binary
0x8close (2-byte status code + optional reason)
0x9ping
0xApong

Opcodes 0x30x7 and 0xB0xF are reserved.

Example

The hex frame 81 05 48 65 6c 6c 6f decodes to FIN = true, opcode 0x1 (text), unmasked, payload length 5, payload 48 65 6c 6c 6f = the text "Hello".

A masked client frame for the same message — 81 85 37 fa 21 3d 7f 9f 4d 51 58 — has the MASK bit set, masking key 37 fa 21 3d, and unmasks back to "Hello".

Good for

Notes & limits

Why is the client payload masked?

RFC 6455 requires every client→server frame to be masked with a random 4-byte key to defend intermediary proxies against cache-poisoning attacks. Server→client frames are never masked. This tool detects the MASK bit and unmasks the payload for you.

What do payload lengths 126 and 127 mean?

The 7-bit length field only reaches 125. The value 126 is a marker that the real length follows as a 2-byte big-endian integer; 127 means it follows as an 8-byte big-endian integer. The tool reads the extended length automatically.

Does anything get uploaded?

No. The parser is compiled to WebAssembly and runs entirely in your browser — the bytes you paste never leave your device.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool parse-websocket-frame "81 05 48 65 6c 6c 6f"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/parse-websocket-frame/?input=81%2005%2048%2065%206c%206c%206f&encoding=auto&format=json

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.