About the WebSocket Header Decoder
The WebSocket Header Decoder parses a WebSocket handshake's request or response headers and verifies the Sec-WebSocket-Key / Sec-WebSocket-Accept exchange, so you can quickly spot handshake bugs without inspecting raw HTTP by hand.
A WebSocket connection starts life as a normal HTTP request that asks the server to "upgrade" the connection, and the server proves it understood that request by hashing the client's key in a specific way and returning the result in Sec-WebSocket-Accept. Getting any part of that exchange wrong — a missing Upgrade header, a proxy that strips Connection, or a broken hash implementation — causes the browser to silently fail the connection with little explanation. This tool reconstructs the whole exchange so you can see exactly which part is broken.
How to Use the WebSocket Header Decoder
Paste the handshake
Paste the raw WebSocket request or response headers, or click "Insert Sample".
Click "Decode Handshake"
The tool parses every header and verifies the Sec-WebSocket-Accept calculation.
Review the results
Check the pass/fail cards and the full header breakdown table.
Common Use Cases
Debugging a Failed Handshake: Paste your server's response when a WebSocket client reports a connection failure to see exactly which header is wrong.
Verifying a Custom WebSocket Server: Confirm your own server implementation computes Sec-WebSocket-Accept correctly before shipping it.
Learning the WebSocket Handshake: See the upgrade request and response headers side by side while studying how the protocol negotiates a connection.
Auditing a Proxy or Load Balancer: Check that headers survive intact after passing through an intermediary like Nginx or a CDN.
Why Use This Tool
Accept Key Verification
Automatically computes the expected Sec-WebSocket-Accept value and checks it against the response.
Full Header Breakdown
See every header field parsed out into a clear, readable table.
Runs Entirely in Your Browser
Headers are decoded locally using the Web Crypto API — nothing is sent to a server.
Built for Debugging
Quickly spot missing or malformed Upgrade, Connection, and WebSocket-Key headers.
Instant Analysis
Get a full handshake analysis the moment you click decode — no waiting.
