Networking & HTTP

WebSocket Frame Decoder

Decode WebSocket frames from a hex or binary capture, field by field.

  • Nothing savedInput and output stay in memory and are gone when you leave this page.
  • Runs in your browserProcessing happens in this page. No application server receives your input.

WebSocket capture (hex)

Summary

Paste hex or drop a capture to decode its WebSocket frames. Nothing is sent anywhere.

Decoded frames

No capture is loaded yet.

Selected frame

Select a frame once a capture is decoded to inspect its fields and bytes.

Reassembled messages

Reassembled messages appear here once a capture is decoded.

What this tool does

Decodes a hex or binary capture into WebSocket frames, field by field: FIN and the reserved bits, opcode, mask flag, payload length in whichever of its three encodings was used, masking key, and unmasked payload. Reassembles continuation frames and reads a close frame's status code and reason.

Sample (corrected per GAP-050): 810b48656c6c6f20776f726c64 is one frame, FIN true · RSV 000 · Opcode 0x1 text · Masked false · Length 11, payload Hello world. 880203e9 is Opcode 0x8 close · Status 1001 Going Away.

Honest limits

It decodes frames. It does not open a socket — WebSocket is a forbidden global in 04 §4.4's ESLint config, and no CSP connect-src grant exists that would permit one (ADR-15, FR-NET-1). Input is bytes you already captured. Permessage-deflate (RFC 7692) payloads are detected by the RSV1 bit and are not inflated: the frame structure is shown and the payload is marked compressed, because inflating it requires the connection's negotiated context, which a single frame does not carry. Extension semantics behind RSV2 and RSV3 are unknown by definition and are reported as set. A capture is decoded as a stream of frames from byte zero; it is not de-framed from a TCP or TLS capture, so a .pcap is not a valid input here. Text payloads are decoded as UTF-8 with replacement, and invalid sequences are flagged rather than hidden.

At most 1.0 MB and 10,000 frames are decoded; beyond either, decoding stops at the last whole frame and Truncated says so. A dropped file of up to 4.0 MB is accepted and only its first 1.0 MB is loaded. A file whose bytes are all hex digits and separators is read as hex text; any other file is read as raw bytes.

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.