How to test a WebSocket endpoint from the browser

Enter a ws:// or wss:// address, press Connect WebSocket, and the log below shows each step: the address it opens, the moment the connection is ready, everything you send, and every frame the server returns. The browser connects from your device straight to that endpoint; voritools.com is only the page you are looking at.

The Example button fills the field with wss://echo.websocket.org, a public echo service that sends every message straight back, so the whole round trip can be checked without your own server.

  1. Paste the endpoint address. It has to start with ws:// or wss://; an http:// or https:// address is converted automatically, and an address without a scheme is rejected with a message instead of being quietly resolved against this page.
  2. Press Connect WebSocket. This page is served over HTTPS, so the browser allows plain ws:// only to localhost or 127.0.0.1; remote servers need wss://. A failed handshake is reported with its close code.
  3. Type a message and press Send Message, or press Enter in the field. The log timestamps show when it left and when the reply arrived. Disconnect closes the socket; Clear resets the address, the message box and the log without touching the connection.

What the log tells you

Close codes and refused connections

A normal close reports code 1000. Code 1006 means the handshake never completed: the port was closed, the host was unreachable, the TLS certificate was rejected, or the server refused the browser's origin. The log prints that code instead of leaving an empty error line.

Browsers do not expose the reason for a failed handshake, so the code is the most precise signal the page can get. For a server on your own machine, check that it is really listening on the port you typed.

Origin, wss:// and localhost

WebSocket connections are not subject to CORS, but a server can inspect the Origin header, and this page sends https://voritools.com. A server that whitelists origins refuses the handshake, and the browser then reports code 1006.

Because the page itself is HTTPS, plain ws:// is accepted only for localhost and 127.0.0.1. Everything else has to be wss://; otherwise the browser blocks the connection before it starts and the page says so.

What the log shows exactly

Frames are printed as escaped text: if a server echoes HTML back, the tags appear literally instead of being rendered into the page, and the same is true for the messages you send.

The log is a running transcript, not a terminal: it shows text frames, it keeps nothing after a reload, and Clear removes it.

Recent tools: