Skip to content

WebSocket Tester

Opens a WebSocket connection, sends frames you compose and logs everything received with timings.

Opens a WebSocket from your browser to a server you name, sends what you type, and logs every frame in both directions with timings. The connection is the browser’s own — nothing passes through our server, so a development endpoint on your machine works the same as a public one.

🔒 Runs entirely in your browserwebsockettestrealtimedebug

Your browser makes the connection itself. Neither the address nor anything sent or received passes through our server.

This page is served over https, so the browser blocks plain ws:// as mixed content. Use wss://, or open your dev server over local http.

Comma-separated. Offered in the Sec-WebSocket-Protocol header; the server picks one.

A browser may only send 1000 or 3000–4999 (RFC 6455 §7.4).

Idle

Send

Log

Received frames are ▼, sent are ▲. Times are measured from the first entry.

Nothing yet.

  • The browser WebSocket API cannot send ping or pong frames of its own, and cannot attach custom headers. Where authentication is needed, the convention is a token in the first message, in the URL query, or as a subprotocol.

How to use it

  1. Enter a wss:// address

    This page is served over https, so the browser blocks plain ws:// as mixed content. A subprotocol can be offered alongside; the server picks one and the log says which.

  2. Send a frame

    Valid JSON is compacted to one line before sending, so a pasted pretty-printed message goes out the way a client would send it. Anything that is not JSON goes as typed.

  3. Read the log by direction and time

    Received frames are ▼, sent are ▲, events are ●, and each is stamped with the elapsed time since the first entry. That is how you tell a server that never answered from one that answered slowly.

  4. Close with a code when you need one

    A browser may only send 1000 or 3000–4999 (RFC 6455 §7.4), so the application-defined range is where your own codes go. The close code that comes back is spelled out in words.

Common questions

Can I add an Authorization header?

Not from a browser — the WebSocket API allows no custom headers at all. The conventions are a token in the first message, in the URL query, or smuggled as a subprotocol; which one to use is up to the server.

It closed with 1006 and no reason

1006 means the connection dropped without a close frame — the server crashed, a proxy timed out, or the handshake was rejected. Browsers deliberately withhold the reason for security, so the answer is in the server log, not here.

Can I send a ping frame?

No. Browsers answer pings automatically and give the page no way to send one. Applications that need a heartbeat send an ordinary message and rely on the server to reply.

Does my traffic go through your server?

No. The browser connects directly, so the address and every frame stay between you and that server. It also means a localhost endpoint works here, which a server-side tester could never reach.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.