HTTP 101 Switching Protocols is an informational status code indicating that the server agrees to switch protocols as requested by the client.
Upgrade request headerThe client requests a protocol change using the Upgrade header. If the server supports the requested protocol, it responds with 101 Switching Protocols.
// HTTP request asking the server to switch to WebSocket
GET /chat HTTP/1.1
Host: example.com
Upgrade: websocket
Connection: Upgrade
The server replies with HTTP/1.1 101 Switching Protocols, confirming the protocol upgrade.
// Protocol switching sequence
Client → HTTP Request (Upgrade header)
Server → 101 Switching Protocols
Connection → New Protocol Active
Click the button below to visualize how the Client and Server handshake works in real-time.
Upgrade headers securely