Eclipse Mosquitto Test Server: connection details & online test

The classic Mosquitto test server, maintained by the Mosquitto project. Great for interoperability tests.

Endpoints and ports

TransportURLCopy
MQTT (TCP)mqtt://test.mosquitto.org:1883
MQTT over TLSmqtts://test.mosquitto.org:8883
WebSocketws://test.mosquitto.org:8080
Secure WebSocketwss://test.mosquitto.org:8081

Credentials: rw / readwrite. Optional. Authenticated listeners (e.g. port 1884) accept rw / readwrite.

About Eclipse Mosquitto Test Server

test.mosquitto.org is the public test server of the Eclipse Mosquitto project. It often runs development builds of Mosquitto and exposes many listeners, including authenticated and certificate-based variants.

It is intended for testing clients against Mosquitto and can be restarted or upgraded at any time.

Highlights

  • Runs the reference Mosquitto implementation
  • Many listener variants (TLS, client certs, auth)
  • No sign-up

Limitations

  • Fully public
  • Frequently restarted, may run unstable builds
  • Can be slow under load

Connect with code

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

const client = mqtt.connect('wss://test.mosquitto.org:8081');

client.on('connect', () => {
  client.subscribe('testmqtt/mosquitto/#');
  client.publish('testmqtt/mosquitto/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