HTTP 101 Switching Protocols — What It Means

What HTTP status code 101 Switching Protocols means, when servers return it, and how to handle it correctly.

Published September 22, 2026

HTTP 101 Switching Protocols — The server is switching protocols as requested by the client, most commonly used to upgrade an HTTP connection to a WebSocket connection.

Key points

  • Triggered by a client sending an "Upgrade" header, e.g. "Upgrade: websocket"
  • After this response, the connection uses the new protocol instead of HTTP
  • Every WebSocket connection begins with an HTTP handshake that completes with a 101 response
More HTTP articles