A client in this tab, speaking text frames
Debug a WebSocket connection
A WebSocket stays open and carries frames in both directions. This page is a client: you choose the address, watch the ready state, and send text. It is not an interceptor for some other app.
The URL must start with ws:// or wss://. On an https page the browser refuses ws://, so this page blocks that mix before the call. There is no header editor. Browsers do not let a page set arbitrary WebSocket headers. Subprotocols are not negotiated here. Incoming data is shown as text. A binary frame is labeled as binary and its byte length is shown, because this debugger is for text protocols such as a JSON message. The log holds the latest 200 lines and lives only in the tab.
Glazlo does not see the frames. The browser opens the socket to the host in the address you typed. That host receives the messages.
This tool runs in your browser. Turn on JavaScript to use it.
What you type, and what the log is for
example.com will not accept this socket. The rows show the shape of a session, not a public echo service to try.
- Address shape
- wss://example.com/socket
- A text frame
- {"type":"ping"}
- Who receives it
- The host in the address, not Glazlo
How to use it
- 1Paste a ws or wss URL for a server you are allowed to use.
- 2Connect, and wait until the status says open.
- 3Send a text frame. Incoming frames append to the log. Disconnect when you are done.
Good to know
- Closing the page closes the socket.
- A failed handshake often means the server rejected the origin, the path, or the certificate.
- This client cannot set a cookie header or an Authorization header. Put a token in the URL only if that server expects it, and remember the host will see it.
Questions
Does Glazlo relay the connection?
No. There is no backend socket. The connection is from your browser to the address.
Why was ws:// refused?
This site is served over HTTPS. Browsers block a non-secure WebSocket from a secure page. Use wss://.
Can I inspect someone else's traffic?
No. You can only open a connection this page starts. It does not attach to another program's socket.
Related tools
- Split a URL into parts
A URL is several fields joined by punctuation. This page uses the browser's URL parser and lists each part, including every query parameter.
- Look up an HTTP status
Status codes are grouped by the first digit. This page lists the ones that show up in APIs and browsers, with a one-line meaning.
- Format and check JSON
JSON is a data format with strict commas, quotes, and no comments. This page parses what you paste and prints it again with an indent, or on one line.