Professional-grade MQTT test client running entirely in your browser. Connect to any MQTT broker over WebSocket (WS/WSS), subscribe with wildcards, publish with QoS 0/1/2, and inspect every message. Perfect for IoT debugging, broker validation, and learning the protocol.
MQTT (Message Queuing Telemetry Transport) is the gold standard for IoT messaging. It uses a publish‑subscribe pattern, decoupling data producers from consumers. This MQTT WebSocket Client Tester allows you to interact with any broker supporting MQTT over WebSocket – a must‑have for debugging, learning, and prototyping.
? Core Concepts – Broker, Topic, Publish/Subscribe, QoS 0/1/2, Retain, Last Will, Clean Session
Our tool exposes every layer: you see CONNACK, SUBACK, PUBLISH packets as they happen.
Invented in 1999 by Andy Stanford-Clark (IBM) and Arlen Nipper (Arcom) to monitor oil pipelines over satellite. The protocol’s minimal overhead (2‑byte header) and support for unreliable networks made it ideal. In 2013, MQTT 3.1.1 became an OASIS standard; MQTT 5.0 (2019) added enhancements like reason codes, user properties, and shared subscriptions. Today, it powers everything from Facebook Messenger to connected cars.
The tool uses the MQTT.js library, which implements the full MQTT protocol over WebSocket. When you provide a broker URL, the browser creates a WebSocket connection and performs the MQTT handshake (CONNECT packet). All subsequent packets (SUBSCRIBE, PUBLISH, PINGREQ, DISCONNECT) are exchanged over the same WebSocket. The log displays packet‑level events, including acknowledgements and errors, giving you insight into the protocol state machine.
We deliberately disabled auto‑reconnect to keep the behavior predictable. If the connection drops, you must manually reconnect.
ws:// for plain WebSocket, wss:// for secure. Many public brokers use port 8080/8081/8084. Some require a path like /mqtt.
+ (single level) and # (multi level) wildcards. Example: home/+/temperature.
| Broker | WebSocket URL | Notes |
|---|---|---|
| Mosquitto Test |
wss://test.mosquitto.org:8081
|
No auth, also ports 8080 (WS) and 8081 (WSS). Reliable. |
| EMQX |
wss://broker.emqx.io:8084/mqtt
|
Free public, supports MQTT 5.0, also port 8083 (WS). |
| HiveMQ Cloud |
wss://[your-cluster].s1.eu.hivemq.cloud:8884/mqtt
|
Requires sign‑up for free cluster, credentials needed. |
| Eclipse IoT |
ws://iot.eclipse.org:80/ws
|
Legacy, may be unstable. Use for simple tests. |
| Local Mosquitto |
ws://localhost:9001
|
Default config with `listener 9001` and `protocol websockets`. |
| QoS | Name | Delivery guarantee | Packet flow | Use case |
|---|---|---|---|---|
| 0 | At most once | Fire and forget – may lose message | PUBLISH → (no ack) | Sensor telemetry, frequent updates where loss is acceptable |
| 1 | At least once | Message assured, duplicates possible | PUBLISH → PUBACK | Control commands, alerts – duplicates tolerated |
| 2 | Exactly once | Message assured exactly once (no duplicates) | PUBLISH → PUBREC → PUBREL → PUBCOMP (4‑way handshake) | Financial transactions, critical messages |
Our log displays the exact MQTT packets you see (e.g., “Received PUBACK” for QoS1).
A renewable energy company deployed thousands of solar inverters, each publishing telemetry (power, temperature) to an MQTT broker. During commissioning, engineers used this tester to:
solar/+/status and observe incoming JSON payloads.
solar/inverter/123/control with QoS 1, ensuring at‑least‑once delivery.
The live log helped catch a misconfigured topic name and a missing authentication parameter, reducing integration time by 70%.
MQTT 5.0 introduces reason codes, user properties, session expiry, and shared subscriptions. Our tester is built on MQTT.js v5.0+ and can connect to MQTT 5.0 brokers (like EMQX 5.0, HiveMQ 4). While we currently use basic CONNECT options, the library already supports v5.0 properties. You can test features like:
$share/group/topic to load‑balance between clients.
We plan to expose these advanced options in a future update.
ws://192.168.x.x:9001. Note that browsers may block insecure WebSocket connections from HTTPS sites; test from a local HTTP page or add a security exception.
$share/group/ (e.g., $share/mygroup/test/#). Our tester supports it – just enter that topic in the subscribe field. Works with brokers that implement MQTT 5.0 shared subs or older shared subscription schemes (like EMQX).
will option in the MQTT.js connect options. We plan to add a LWT configuration panel soon.