WebSocket & SSE Live Tester
Is your realtime endpoint actually answering? Connect and watch the frames arrive.
A WebSocket is a persistent two-way connection; server-sent events are a one-way text stream over plain HTTP. Both fail in ways a curl command hides: a handshake that never completes, a close frame with no reason, a stream that stops without saying why. Paste an endpoint here and this tester connects from your browser — live — logging every frame and event with direction, payload, timestamp and round-trip latency, and naming the close code when the connection ends. The companion article Test WebSocket and SSE endpoints live in your browser explains what the log is telling you. Also see the MCP Server Probe and the GraphQL Introspection & Security Checker.
Last updated:
1. Test a live endpoint
Mode
Results
Connection status
Live log
🔒 The test runs entirely in your browser: the endpoint URL and every message stay on your machine — nothing is uploaded, stored, or sent anywhere except the connection you open. Demo endpoints need no account and no credentials.
What WebSocket and SSE are
A WebSocket starts as an ordinary HTTP request that asks the server to upgrade the connection — and then stays open. Both sides can send messages, called frames, at any time: text frames, binary frames, ping and pong frames, and a close frame that ends the connection with a numeric code and an optional reason. RFC 6455 defines the protocol, including the close codes this tester names for you: 1000 means a normal closure, 1006 means the connection dropped without a close frame at all.
Server-sent events (SSE) are simpler and one-way: the client makes an ordinary HTTP request and the server answers with a response that never ends, sending lines of text as events arrive. Each event is a small block of lines — event: names the type, data: carries the payload (and can repeat, joining with newlines), id: sets the last event id, retry: tells the client how long to wait before reconnecting. The response must declare content-type: text/event-stream, and the browser’s built-in EventSource hides the HTTP status and headers — which is why this tester reads the stream with fetch instead.
The log is the whole point of the tool. Every entry carries a timestamp and a direction — sent, received, or an event from the stream — plus the payload (truncated at 4,096 characters so one huge frame cannot flood the page) and, for echo replies, the round-trip latency in milliseconds: the time from sending a message to seeing its echo come back. State transitions are logged too: connecting, open, closing, closed, and the close code with its name when the connection ends.
Connections end, and the close code says why — or says that nobody said why. A clean 1000 means both sides agreed to close. A 1006 means the connection died without a close frame: the server went away, a proxy cut it, or the network dropped it, and no reason was ever sent. A 1015 means the TLS handshake failed. The code is the first thing to read when a connection that worked yesterday stops working today.
What this tester does — and what it does not
It connects from your browser and logs what happens. In WebSocket mode it uses the browser WebSocket API: connect to a ws:// or wss:// URL, send the preset or your own text message, watch frames arrive with latency, and disconnect or reconnect. In SSE mode it uses fetch and a ReadableStream: connect to an http:// or https:// endpoint, see the HTTP status and content-type (text/event-stream is expected — anything else earns a warning), and watch events arrive with their type and payload. Both modes offer clear, copy log, and a JSON log export you can keep or paste into a bug report.
It does not show what the browser will not show. The WebSocket API exposes no handshake request or response headers, so this tool cannot report them — it reports state transitions, timing and frames instead, and says so plainly. It does not store credentials, and the demo endpoints need none. It sends nothing to any server of ours: the only bytes that leave your browser are the ones you send to the endpoint you chose.
The demos use public endpoints that need no account. The WebSocket demo connects to the public echo service at wss://echo.websocket.events, auto-sends {"type":"ping","message":"hello from sysosx"} and logs the echo with its latency. The SSE demo connects to the Wikimedia recent-change stream at https://stream.wikimedia.org/v2/stream/recentchange, and recentchange events arrive within seconds. If a demo endpoint ever stops answering, the button reports the failure honestly instead of inventing a log.
Be honest about what a live test proves
A successful connect proves the endpoint accepts connections from a browser — nothing more. It does not prove the endpoint is secure, production-ready, or correct: a WebSocket that echoes your message may still mishandle the messages your app actually sends, and an SSE stream that flows may still send events your client cannot parse. Read the frames, not just the green state.
And a failed connect is not a verdict on the endpoint either. Browsers enforce rules your server-side code never meets: an SSE fetch is blocked when the endpoint does not send CORS headers, a wss:// page cannot open a ws:// connection (mixed content), and a server that rejects the browser’s Origin header will refuse this page while accepting your app. A failure here means “this browser could not connect” — check the log line, then test from your own client before blaming the server.
Key facts
| WebSocket | A persistent two-way connection over a single TCP socket, upgraded from HTTP (RFC 6455). Either side can send frames at any time; the connection stays open until one side closes it. |
| SSE | Server-sent events: a one-way text stream over plain HTTP. The server sends event blocks — event:, data:, id:, retry: lines — and the client reads them as they arrive. No upgrade, no frames, just a response that never ends. |
| Frame | One WebSocket message on the wire: text, binary, ping, pong, or close. The log shows text frames; binary frames are reported by size, not by content. |
| Close code | A number in the close frame that says why a WebSocket connection ended: 1000 normal closure, 1006 abnormal closure with no close frame, 1015 TLS handshake failure. The full table is RFC 6455 §7.4. |
| EventSource | The browser’s built-in SSE client. It reconnects automatically and parses events for you — but it hides the HTTP status and headers, which is why this tester reads the stream with fetch instead. |
| CORS | Cross-Origin Resource Sharing: the browser rule that decides whether a page may fetch from another origin. An SSE endpoint that sends no CORS headers cannot be read from this page, even though curl reads it fine. |
| Handshake | The opening exchange of a WebSocket connection: an HTTP request asking to upgrade, answered 101 Switching Protocols. The browser shows the result — open or failed — but never the headers. |
| Format reference | RFC 6455 — The WebSocket Protocol |
Frequently asked questions
Why can’t this tester show the WebSocket handshake headers?
Because the browser will not show them to any page. The WebSocket API reports the connection state — connecting, open, closing, closed — and the frames and close code, but never the HTTP request or response headers of the upgrade. No browser tool can work around that; it is a limit of the API, not of this page. The SSE mode can show the status and content-type because it uses fetch, which does expose the response. If you need the handshake headers, capture them with your server’s logs or a packet capture, not a browser.
Why does the live test fail when my endpoint works in my own app?
Usually one of three browser rules. First, CORS: an SSE fetch is blocked when the endpoint sends no Access-Control-Allow-Origin header — your server-side client never meets this rule, so it connects fine. Second, mixed content: a page loaded over https:// cannot open a ws:// connection; use wss://. Third, Origin: some servers reject the browser’s Origin header while accepting your app’s requests. The log line says which one it was — read it before blaming the server.
What does close code 1006 mean, and how do I fix it?
1006, Abnormal Closure, means the connection died without a close frame: nobody said goodbye, so nobody said why. The usual causes are the server crashing or restarting, a proxy or load balancer cutting an idle connection, or the network dropping. Fix it by checking the server first — its logs, its restart history, and any idle timeout on the proxy in front of it — and by adding a heartbeat: send a ping every 30 seconds so an idle connection is never cut for being quiet.