WebSocket Tester

Connect to and debug WebSocket endpoints online

Runs in your browserDebugging07Network & Web

What is WebSocket Tester?

This WebSocket tester opens the connection directly from your browser, letting you send text messages and watch the send and receive log, the connection state, and close codes in real time. The traffic never passes through this site's servers, so nothing you debug is recorded.

How to use WebSocket Tester

  1. 1Enter a wss:// URL and click Connect.
  2. 2Compose a message on the left and click Send.
  3. 3Watch the log on the right for incoming and outgoing messages and for close codes.
  4. 4Click Disconnect when you are finished.

Common errors and how to fix them

SymptomCauseFix
The connection fails immediately with no stated reasonFor security reasons, browsers do not expose handshake failure details to the page.Work through the possibilities one at a time: is the URL wss, does the server require authentication (often a token in the query string), and are there cross-origin restrictions in place?
Connecting to ws:// from an HTTPS page is refusedThe mixed content policy forbids a secure page from opening an insecure WebSocket connection.Switch to wss://, or run your debugging from a local http page.

Frequently asked questions

Why can I only connect to wss:// URLs?+

This site is served over HTTPS, and the browser's mixed content policy blocks plaintext ws:// connections from a secure page. That is browser behavior, and no online tool can work around it; if you need ws://, run the test from a local http page instead.

What do the common WebSocket close codes mean?+

1000 is a normal closure and 1001 means the page went away. 1006 means the connection dropped without a close frame, usually a network interruption or the server hanging up. 1008 is a policy violation and 1011 is an internal server error. 1006 is both the most common and the hardest to diagnose, and tracking it down almost always requires the server logs.

Related tools

All tools