Developer Tools

WebSocket to cURL

Convert a WebSocket connection to cURL handshake, wscat, websocat, JavaScript, or Python code

WebSocket connection
.sh
curl -i -N 'https://echo.websocket.org' \
  -H 'Connection: Upgrade' \
  -H 'Upgrade: websocket' \
  -H 'Origin: https://echo.websocket.org' \
  -H 'Sec-WebSocket-Version: 13' \
  -H 'Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==' \
  -H 'Authorization: Bearer YOUR_TOKEN'

The cURL output is the raw HTTP Upgrade handshake (RFC 6455). Use it to verify the server returns 101 Switching Protocols. cURL itself doesn't speak the WebSocket frame protocol after the handshake — for that, switch to wscat or websocat.

Don't see what you need?

We build free tools based on community feedback. If there's a utility that would improve your workflow, suggest it today!

WebSocket to cURL — Free Tool Online | FreeTool24 | FreeTool24