WebSocket Tester
Connect to and debug WebSocket endpoints online
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
- 1Enter a wss:// URL and click Connect.
- 2Compose a message on the left and click Send.
- 3Watch the log on the right for incoming and outgoing messages and for close codes.
- 4Click Disconnect when you are finished.
Common errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
| The connection fails immediately with no stated reason | For 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 refused | The 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 toolsHTTP Status Codes
HTTP status code reference with likely causes and where to look
URL Parser
Break a URL into its components and query parameters
MIME Type Lookup
MIME type and file extension reference
User Agent Parser
Parse a User-Agent string into browser and OS details
CIDR Subnet Calculator
CIDR subnet calculator with membership checks
HTTP Header Analyzer
Inspect response headers and security header coverage