Yes, you can test a WebSocket in Postman without writing a line of client code. You open a WebSocket request, type a ws:// or wss:// server URL, click Connect, then send and read messages in a live pane that stays open as long as the connection does.
That matters because a streaming connection behaves nothing like a normal API call. A WebSocket pushes data to you whenever the server has something to say, so you can’t check it with the same request-and-done flow you use for REST. Postman gives you a dedicated client for exactly this job, and it handles everything from a simple chat socket to a blockchain feed that streams a new block every few seconds.
This guide walks through what a WebSocket is, why you’d test one by hand, and the exact steps in the current Postman app (v12). It finishes with a real blockchain example, since live on-chain data is one of the most common reasons developers reach for a WebSocket client in the first place.
What Is a WebSocket Connection?

A WebSocket is a persistent, two-way link between a client and a server that stays open after the first handshake. Both sides can send data at any time over a single TCP connection, with low latency and little overhead, and neither has to keep re-asking for updates (MDN Web Docs).
Compare that to HTTP. A regular request opens a connection, sends one message, gets one response, and closes. To watch for changes, an HTTP client has to poll the server over and over. A WebSocket replaces that loop with one long-lived channel, which is why it underpins live chat, trading tickers, multiplayer games, and real-time dashboards.
The protocol itself is defined in RFC 6455 and starts life as an HTTP request carrying an Upgrade header. Once the server agrees, the connection switches from HTTP to the WebSocket protocol and the full-duplex channel is live.
ws:// vs wss:// — What’s the Difference?
Both are WebSocket URL schemes, and the single letter is the whole story. A ws:// connection sends data in plain text, while a wss:// connection wraps the same traffic in TLS encryption, the way https:// secures a web page.
Use wss:// for anything real. Most hosted services, including blockchain providers, only expose secure wss:// endpoints, and browsers block insecure ws:// connections opened from an HTTPS page. Reach for ws:// only when you’re testing a local server on your own machine.
Why Test a Live Connection Before You Code?
Because a broken WebSocket is painful to debug from inside an application. If you wire the socket straight into your frontend and nothing shows up, you can’t easily tell whether the handshake failed, the auth was wrong, your subscription message was malformed, or the server simply isn’t pushing anything.
Testing the connection by hand isolates each of those. You confirm the server accepts your URL and credentials, you send a message and watch the exact reply, and you see whether data actually streams in. Only once that works do you move the logic into code, so you debug one thing at a time instead of two.
It’s also the fastest way to read an unfamiliar API. Connect, send a sample message, and the response pane tells you the shape of the data far quicker than the documentation usually does.
Who Uses Postman’s WebSocket Client?
Anyone who integrates real-time data rather than one-off requests. The common cases include:
- Backend and API developers verifying that a new WebSocket endpoint accepts connections, authenticates correctly, and returns the right payloads.
- dApp and wallet developers subscribing to on-chain events such as new blocks, pending transactions, or contract logs.
- QA and test engineers reproducing a live-data bug or checking a feed before it ships.
- Frontend developers inspecting the message format a socket sends before building UI around it.
If your app shows something that updates on its own — a price, a notification, a status light — there’s probably a WebSocket behind it, and Postman is a quick way to poke at it.
How Do You Set Up a WebSocket Request in Postman?
Postman offers two request types. A raw WebSocket request sends and receives plain messages, which is what most APIs and blockchain endpoints use. A Socket.IO request speaks the Socket.IO library’s event-based layer on top of WebSocket, so pick that one only when the server runs Socket.IO. This guide uses raw WebSocket.
If you’d rather not install anything first, Postman also ships free browser tools that connect to a WebSocket server and send or receive messages with no account required (Postman Docs). The desktop app is still the better home for repeat work, since you can save requests and organize them in collections.
Create the Request and Connect
- Select New > WebSocket to open a raw WebSocket request in a new tab. In the desktop app you can also press ⌘+N or Ctrl+N.
- Enter the server URL in the address field. It must begin with
ws://orwss://. - If the endpoint needs authentication, open the Headers or Params tab and add your credentials — for example, an
Authorizationheader or an API key. - Click Connect.
A status badge at the top of the response area shows whether the connection is connecting, connected, disconnecting, or disconnected. Hover over it for connection details, and click Disconnect when you’re done.
Web app note: If you’re using Postman in the browser, run the Postman Desktop Agent as well. It lets the web app reach servers on your own network and gives the connection a more reliable path.
Send and Read Messages
Once connected, use the editor pane to compose a message. In the bottom-left corner you choose the format — Text, JSON, XML, HTML, or Binary (with a Base64 or Hexadecimal option) — and the editor adds syntax highlighting to match. A Beautify button tidies up JSON, XML, or HTML before you send it. Click Send, and the message stays in the editor so you can tweak and resend it.
Everything that crosses the connection lands in the Response pane as a running list of incoming, outgoing, and network messages, each stamped with your local time. A few controls make a busy stream readable:
- Search filters the list to messages containing a term.
- All Messages switches between all, sent, or received messages.
- Clear Messages empties the list.
- Selecting two messages’ checkboxes shows the time difference between them — handy for measuring how often a server pushes.
Click any message to expand it, reformat it as Text, JSON, XML, or HTML, or view it as a hexdump. You can also save a message with the request and reload it later from the Saved messages pane, which beats retyping the same subscription command every session.
Raw WebSocket vs Socket.IO
The two request types look similar but differ in how you send data. This table covers the parts that trip people up:
| Raw WebSocket | Socket.IO | |
|---|---|---|
| What it sends | Plain messages in your chosen format | Named events with arguments |
| Event name | Not used | Entered next to Send; defaults to message |
| Delivery receipt | Not built in | Optional Ack from the server |
| When to use it | Standard APIs, blockchain wss:// endpoints | Servers built on the Socket.IO library |
If you connect a Socket.IO request to a raw WebSocket server, or the reverse, it won’t work. Check which one the API documents before you start.
Streaming Blockchain Events Over a WebSocket

Live on-chain data is a textbook WebSocket use case, and it shows why the protocol exists. On EVM networks like Ethereum, the eth_subscribe method opens a subscription that pushes an event every time something happens — a new block, a pending transaction, or a log that matches a filter. It only works over WebSocket; call it on a plain HTTP endpoint and the node rejects it (Go Ethereum docs).
There are three common subscription types:
newHeads— fires on every new block header.logs— fires on contract events matching anaddressandtopicsfilter.newPendingTransactions— fires on each transaction entering the mempool.
A Worked Example With eth_subscribe
Here’s the flow for watching new Ethereum blocks arrive in real time:
- Open a raw WebSocket request and enter an Ethereum
wss://endpoint (with your API key, if the provider requires one). - Click Connect.
- Set the editor format to JSON and send this message:
json
{ "jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"] }
- The server’s first reply is a subscription ID, a hex string like
"0xcd0c3e8af590364c09d0fa6a1210faf5". - After that, a new block header streams into the response pane roughly every 12 seconds, each one tagged with that subscription ID.
To stop the stream, send eth_unsubscribe with the ID you were given, or just click Disconnect. One thing to remember: subscriptions are tied to the connection, so if the WebSocket drops, the node cancels them and you’ll need to resubscribe after reconnecting.
Where to Get a wss:// Endpoint
To run the example above you need a WebSocket endpoint for the network you’re testing. Public endpoints are fine for a quick look, but they’re rate-limited and the WebSocket interface is usually the first thing throttled under load.
NOWNodes provides WebSocket API access listed for 30+ networks, so you can grab a wss:// URL and an API key instead of running your own infrastructure. Its Ethereum endpoint exposes eth_subscribe alongside standard JSON-RPC methods, and the free Start plan includes 100,000 requests to test with. For monitoring that runs around the clock — a bot watching the mempool, say — a dedicated endpoint removes the shared-traffic ceiling, since throughput is then bound by the hardware you’re allocated rather than a request cap.
Common WebSocket Errors and How to Fix Them
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused or 401 / 403 | Missing or wrong API key | Add the key as a header or in the URL and reconnect |
eth_subscribe returns an “invalid request” error | Called over an HTTP endpoint | Switch to a wss:// URL — subscriptions are WebSocket-only |
| Connected, but no messages arrive | No subscription sent, or an empty feed | Send your subscribe message; try newHeads first |
| Stream suddenly stops | Connection dropped, cancelling subscriptions | Reconnect, then resubscribe |
| Web app can’t reach a local server | No Desktop Agent running | Start the Postman Desktop Agent |
Conclusion
Testing a WebSocket in Postman turns an invisible, always-on connection into something you can watch and poke at directly. Open a request, connect to a ws:// or wss:// URL, send a message, and read whatever the server pushes back — the same handful of steps whether you’re checking a chat socket or subscribing to Ethereum blocks with eth_subscribe.
Do that validation before you touch application code and you save yourself a round of guesswork, because you already know the endpoint, the auth, and the message format all work. Once the connection behaves the way you expect in Postman, wiring it into your app is the easy part.
FAQ
Do I need the Postman desktop app to test WebSockets?
No, the web app can send WebSocket requests, but you should run the Postman Desktop Agent alongside it for the best experience. The agent lets the browser-based app reach servers on your own network and gives the connection a more reliable route. The desktop app also makes it easier to save and organize requests.
Can I test a WebSocket without a Postman account?
Yes. Postman offers free browser tools that connect to a WebSocket server and send or receive messages with no sign-in required, which is enough for a quick check. For saving requests, writing scripts, or working in collections, you’ll want the full app and an account.
Can I save and reuse WebSocket requests in Postman?
Yes. You can save a composed message with the request and reload it from the Saved messages pane, and you can save the request itself to a collection like any other Postman request. That lets you keep a ready-made subscription command — such as an eth_subscribe call — instead of retyping it each session.
Why does my WebSocket connection drop after a while?
Many servers close connections that sit idle too long, and network or proxy timeouts can cut a connection as well. When that happens, Postman’s status badge switches to disconnected; just reconnect. If you were running a subscription, resend the subscribe message afterward, since the server drops subscriptions when the connection ends.



