# WebSocket Tester

> Connect to any ws/wss endpoint and inspect live frames.

Free WebSocket testing tool. Connect to ws:// or wss:// endpoints, send text messages, and watch a live timestamped log of incoming, outgoing, and system frames. Close codes are decoded, and an optional heartbeat keeps idle connections alive.

- Page: https://benchline.fabwaseem.com/t/websocket-tester
- Runs: in the browser, plus one server fetch of the public URL you give it.
- Price: free, no account
- Input: A ws/wss URL, outgoing messages, and heartbeat settings.
- Output: A live timestamped frame log with decoded close codes.
- Keywords: websocket tester online, test websocket, wss client, websocket debugger
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Enter the endpoint.** Type a ws:// or wss:// URL, including any path or query token.
2. **Connect and send.** Open the connection, type a message, and send it. Incoming frames appear instantly.
3. **Read the log.** Each frame is timestamped and marked in, out, or system. Closing shows the decoded close code.

## Use it from an AI agent

MCP tool name: `validate_websocket_url`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/websocket-tester with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

Validate and parse a ws:// or wss:// URL into its components, and optionally decode a WebSocket close code.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "explainCloseCode": {
      "type": "integer",
      "minimum": 1000,
      "maximum": 4999
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "validate_websocket_url",
    "arguments": {
      "url": "https://example.com/file"
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Can I set custom headers or subprotocols?

Browsers do not let JavaScript set custom headers on the WebSocket handshake, and this tool does not negotiate subprotocols. For full handshake control use curl or a native client.

### Why won't my local server connect?

Use ws:// for plain local servers. Browsers block mixed content: an https page cannot open a ws:// connection, so serve the page over http or use wss://.

### What does the heartbeat do?

Browsers cannot send protocol ping frames, so the heartbeat sends a small text message on an interval you choose — enough to keep most idle connections and proxies from timing out.

### Is my traffic sent anywhere else?

No. Frames travel straight from your browser to the endpoint you entered.

## Related tools

- [GraphQL Client](https://benchline.fabwaseem.com/t/graphql-client): Query any GraphQL endpoint with variables, headers, and history.
- [cURL Converter](https://benchline.fabwaseem.com/t/curl-converter): Turn any curl command into fetch, Python, Go, PHP, or Rust.
- [HTTP headers](https://benchline.fabwaseem.com/t/http-headers-checker): Follow redirects and grade the security headers on a public URL.
- [DNS lookup](https://benchline.fabwaseem.com/t/dns-lookup): Query A, AAAA, MX, TXT, CNAME, and CAA over DNS-over-HTTPS.
