HiveMQ Public Broker: connection details & online test

One of the most widely used public MQTT sandboxes. Open to everyone, no authentication.

Endpoints and ports

TransportURLCopy
MQTT (TCP)mqtt://broker.hivemq.com:1883
MQTT over TLSmqtts://broker.hivemq.com:8883
WebSocketws://broker.hivemq.com:8000/mqtt
Secure WebSocketwss://broker.hivemq.com:8884/mqtt

About HiveMQ Public Broker

The HiveMQ public broker is a free MQTT sandbox operated by HiveMQ. It accepts anonymous connections on plain TCP, TLS and WebSockets, which makes it a common default in tutorials and sample code.

Because it is completely open, every message you publish can be read by anyone subscribed to the same topic. Use unique topic names and never send real data through it.

Highlights

  • No sign-up or credentials
  • TCP, TLS, WS and WSS endpoints
  • Commonly used in tutorials

Limitations

  • Fully public — anyone can read your topics
  • No authentication or access control
  • No uptime guarantee; intended for testing only

Connect with code

mosquitto CLI
mosquitto_sub -h broker.hivemq.com -p 1883 -t 'testmqtt/hivemq/#' -v
MQTT.js (browser or Node.js)
import mqtt from 'mqtt';

const client = mqtt.connect('wss://broker.hivemq.com:8884/mqtt');

client.on('connect', () => {
  client.subscribe('testmqtt/hivemq/#');
  client.publish('testmqtt/hivemq/hello', 'Hello from MQTT.js');
});

client.on('message', (topic, payload) => {
  console.log(topic, payload.toString());
});

Having trouble? See common MQTT connection errors or learn how to test an MQTT broker step by step.

From the makers of TestMQTT

Outgrown the public sandbox?

Public test brokers are shared with thousands of strangers. ConnectMQ gives you a private MQTT broker you can trust with real devices — set up in minutes.

  • Your own isolated broker — nobody else can read your topics
  • Username / password auth and per-topic access control
  • TLS and secure WebSockets, MQTT 3.1.1 and MQTT 5
  • Same client code from first test to production

Other MQTT brokers