πŸ”Œ

WebSocket Tester

Connect to any WebSocket server, send messages, and inspect real-time events β€” right in your browser. Supports text, JSON, and binary.

Disconnected
↑ 0 sent ↓ 0 received 0s
Sub-protocols (optional)
Send Message
Quick Messages
Message Log
SYS Enter a WebSocket URL and click Connect to start. now

About WebSocket Tester

This tool opens a real WebSocket connection from your browser to any ws:// or wss:// server. Once connected, you can send text or JSON messages and watch server responses appear in the message log with timestamps, direction indicators, and a running count of sent and received frames.

The connection is established directly between your browser and the server β€” no proxy or relay is involved. It supports optional sub-protocols (graphql-ws, STOMP, MQTT) and Quick Message presets to speed up testing common patterns like ping/subscribe payloads.

Common Use Cases

How to Use

  1. Choose ws:// or wss:// from the scheme dropdown and enter your server's hostname and path
  2. Optionally add sub-protocols (like graphql-ws) using the Sub-protocols panel
  3. Click "Connect" β€” the status dot turns green when the handshake succeeds
  4. Type a message in the Send panel and click Send, or use a Quick Message preset β€” replies appear in the Message Log in real time

Frequently Asked Questions

Why does my connection fail immediately?

Common causes are: wrong URL scheme (using wss:// for a non-TLS server, or vice versa), the server rejecting the origin because it has no CORS-equivalent policy for WebSockets, or the server requiring a specific sub-protocol header. Check the browser console for the specific close code and reason.

What is a WebSocket sub-protocol?

Sub-protocols are application-level agreements between client and server about the message format. For example, GraphQL subscription servers expect the graphql-ws sub-protocol; STOMP message brokers expect v10.stomp. If the server requires a specific sub-protocol and the client does not send it, the handshake will be rejected.

Can I send binary data?

This tool sends text and JSON string frames. The message log displays incoming binary frames as a size indicator (e.g., "[Binary: 128 bytes]") but does not decode them. For binary protocol testing (protobuf, MessagePack), use a native WebSocket client like wscat or websocat from your terminal.

Advertisement