Connection

A bare host is accepted — example.com/socket becomes wss://example.com/socket on this page, because an https page cannot open anything else. The subprotocol field takes a comma-separated list; leave it empty unless the server asks for one.

Messages

Enter sends, Shift+Enter makes a newline. Incoming text that happens to be JSON is pretty-printed for reading; incoming binary is shown as its length and the first 64 bytes in hex.

Log

The socket is the browser's own, opened straight from this tab. There is no proxy in between, so the server sees your real address and whatever Origin this site sends — that is worth knowing before pointing it at a private service.

A close code of 1006 means no close frame arrived. The browser cannot tell you why: a refused port, a wrong path and a rejected handshake all produce it. If you need something to connect to, wss://echo.websocket.org and wss://ws.postman-echo.com/raw are third-party echo servers that may or may not be up.

About this tool

Open a WebSocket from your browser, send text or binary frames, and watch everything that arrives in a timestamped log. The connection is made by the page itself, so it goes from your machine to the server you name and through nothing else. Binary frames can be typed as hex and are converted for you, and JSON that comes back is indented so it is readable. Close codes are explained rather than just printed.

Questions

Why can I not connect to a ws:// address from this page?
Because the page is served over https, and a browser refuses to open an insecure WebSocket from a secure page — it would be a hole in the padlock. This is a mixed-content rule enforced by the browser, not a setting here. Use wss://, or run the test from a page served over plain http, or use a command-line client such as websocat for a local ws:// endpoint. The page allows ws:// to localhost, which browsers treat as trustworthy.
What does close code 1006 mean?
That the connection closed without a close frame — no proper handshake, no reason string. It is what you see when the server process died, a proxy dropped the connection, or the network went away, and it is deliberately not a code a server can send you. The log spells this out because 1006 on its own looks like a mystery number.
Can I send binary data?
Yes. Tick "Send as binary" and type the bytes as hex, and the page converts them to an ArrayBuffer before sending. Anything that is not valid hex is refused with a message rather than being sent as something else. Replies are labelled as text or binary in the log, and binary replies are shown as hex.
How do I connect with a subprotocol?
Type them in the subprotocol field, comma separated — for example chat, superchat. The server picks one and the log records which one it chose, which is the part people actually need to see when a handshake succeeds but the application protocol is wrong.