WebSocket Tester

Connect to any ws:// or wss:// endpoint, send messages, and watch a live, timestamped log — right in your browser

Ctrl/⌘ + Enter to send

Connect to an endpoint to start the log

The connection is made directly from your browser — no proxy in between. Because this page is served over HTTPS, browsers only allow secure wss:// endpoints (plus ws://localhost in most browsers). Custom request headers can't be set from a browser WebSocket; pass tokens via the URL query or the first message instead.

About this tool

The ToolNinja WebSocket Tester is a lightweight WebSocket client that runs in your browser. Point it at any wss:// endpoint, connect, send text or JSON messages, and watch every sent message, received message, and connection event in a timestamped log. It's built for the quick checks that don't justify installing a desktop client: is the server up and accepting connections, does it echo, does it require a specific subprotocol, what close code does it send when it drops you? Close events show the code and reason, binary frames show their size and a hex preview, and JSON messages can be pretty-printed in the log. The connection goes straight from your browser to the server with no proxy in between, so it behaves exactly as your own front-end code would.

When to use it

  • →Checking that a WebSocket server is reachable and accepting connections
  • →Manually sending test messages to a real-time API or chat backend
  • →Debugging subprotocol negotiation (e.g. graphql-ws)
  • →Seeing the exact close code and reason when a server drops the connection

Tips

  • ◆Close code 1000 is a normal closure, 1006 means the connection dropped without a close frame (usually network or server crash), and 1008/1011 point to a server-side policy or error.
  • ◆Browsers can't set custom headers like Authorization on a WebSocket. Pass tokens as a URL query parameter or in the first message instead.
  • ◆From an HTTPS page, browsers only allow wss:// connections (plus ws://localhost in most browsers), so plain ws:// to a remote host is blocked as mixed content.

Frequently asked questions

Why does the error message say so little?

Browsers deliberately hide WebSocket connection-failure details from page scripts, for security reasons. Check the close code in the log and the browser's DevTools Network tab, which shows the full handshake.

Can I test a local development server?

Usually yes. Most browsers treat ws://localhost as secure enough to connect to from an HTTPS page. For other hosts, the server needs to be served over wss://.

Is my traffic routed through ToolNinja?

No. The WebSocket connection is opened directly from your browser to the endpoint you enter. ToolNinja never sees the messages.

Related tools

🥷 ToolNinja