toolfora
Home / Network / WebSocket Debugger

WebSocket Debugger

Debug WebSocket connections in your browser: connect to ws:// or wss:// URLs with subprotocols and Socket.IO presets, send text or binary frames, watch handshake and close diagnostics, filter traffic, and run multiple sessions in parallel tabs.

Connections

How to use the WebSocket Debugger

This tool turns your browser into a full WebSocket client for testing, inspecting and diagnosing any ws:// or wss:// endpoint. Everything runs locally in your browser — no data is sent to us.

1. Create a connection tab

Click + New tab to open a new session. Each tab is fully independent, so you can run several WebSocket conversations side by side without interfering with each other.

2. Configure and connect

  • URL — enter a ws:// or wss:// address. On a page served over HTTPS you can only reach wss:// endpoints, and the server certificate must be valid.
  • Subprotocols — optional. Enter several names separated by commas (e.g. chat, superchat). After connecting, the tool shows which subprotocol the server actually selected.
  • Timeout — how long to wait for the handshake before giving up, in case the server never answers.
  • Preset — choose Native WS for a plain WebSocket, or Socket.IO v3-v4 to automatically append the Engine.IO handshake parameters (EIO version, transport=websocket, etc.).

Click Connect. The status badge moves through CONNECTING → OPEN → CLOSING → CLOSED, and every handshake step is logged.

3. Send frames

  • Send text frames by typing into the Send box, or binary frames by choosing HEX, Base64 or JSON ArrayBuffer input.
  • HEX input accepts space-separated bytes, e.g. 48 69 00 FF.
  • JSON replies are auto-formatted, syntax-highlighted and collapsed into a tree for easy reading.
  • Send templates support variables: {{ts}} (unix timestamp), {{time}} (HH:MM:SS) and {{rand}} (random 8-char string) are replaced at send time.

4. Automation

  • Heartbeat — send an application-layer ping on an interval. This uses exponential back-off: if the server stops responding, the interval increases, and the message is retried up to the configured maximum before disconnecting. Manual disconnects are never auto-reconnected.
  • Auto-reconnect — reconnect with exponential back-off plus jitter, up to a maximum number of retries.
  • Loop send — repeat the current frame at a fixed interval (useful for stress or simulation).

5. Diagnostics

  • Watch the raw handshake log, the negotiated subprotocol and extensions (such as permessage-deflate).
  • Close codes are decoded: 1000–1015 map to their standard meaning, and 4000–4999 are flagged as application codes — check the server documentation for those.
  • Every received/sent frame is logged with direction, byte count, timestamp and frame type.

6. Filter and export

  • Filter logs by keyword, or by direction (RX / TX). Logs are capped at 5000 entries to keep the page responsive.
  • Export the whole session as JSON, or copy the raw frame text.

Browser limitations to know

  • You cannot set arbitrary HTTP request headers — only the subprotocol list is configurable.
  • The browser controls protocol-level ping/pong automatically; you cannot send them yourself. Heartbeats here are application-layer text frames such as {"type":"ping"}.
  • wss:// connections require a valid TLS certificate on the server.