A simple browser-based MQTT client using MQTT.js over WebSocket. This client allows you to connect to MQTT brokers, subscribe to topics, and publish messages directly from your web browser.
- Connect to any MQTT broker that supports WebSocket connections
- Subscribe/Unsubscribe to MQTT topics
- Publish messages to topics
- Real-time message display with auto-scroll
- Advanced logging controls:
- Filter messages by type
- Auto-scroll toggle
- Download logs
- Open logs in separate window
- Connection status monitoring
- Support for both ws:// and wss:// protocols
- Clone this repository
- Open
index.htmlin a web browser - No build process required - it runs directly in the browser
When accessing the client over HTTPS, you must use secure WebSocket (wss://) connections:
- EMQX:
wss://broker.emqx.io:8084/mqtt - HiveMQ:
wss://broker.hivemq.com:8884/mqtt - Mosquitto:
wss://test.mosquitto.org:8081
Note: When running locally over HTTP, you can use regular WebSocket (ws://) connections.
- Enter the broker WebSocket URL
- Use
wss://URLs when accessing over HTTPS - Use
ws://URLs only when accessing locally over HTTP
- Use
- Click "Connect"
- Wait for "Status: Connected"
- Enter a topic (e.g., "test/topic")
- Click "Subscribe" to start receiving messages
- Click "Unsubscribe" to stop receiving messages
- Messages will appear in the messages area
- Toggle auto-scroll with the checkbox
- Filter messages using the multi-select dropdown
- Open logs in a new window using "Open Logs Window"
- Download visible logs using "Download Logs"
- Enter a topic
- Enter your message
- Click "Publish"
- Secure WebSocket (wss://) - Default port 8084 - Recommended for HTTPS sites
- WebSocket (ws://) - Default port 8083 - Only works when accessing over HTTP
- MQTT (mqtt://) - Default port 1883 (Not supported in browsers)
- Secure MQTT (mqtts://) - Default port 8883 (Not supported in browsers)
- Check the message area for detailed logs
- Different colors indicate different message types:
- Blue: Info messages
- Green: Success messages
- Red: Error messages
- Orange: Warning messages
- Gray: MQTT messages
Different colors indicate different message types:
- Blue: Info messages
- Green: Success messages (connections, subscriptions)
- Red: Error messages
- Orange: Warning messages
- Gray: MQTT messages
- Auto-scroll: Automatically scroll to new messages
- Message Filtering: Show/hide specific message types
- External Window: View logs in a separate window
- Download: Save visible messages as a text file
- When accessing this client over HTTPS, you must use secure WebSocket (wss://) connections
- Attempting to connect to insecure WebSocket endpoints (ws://) from HTTPS will be blocked by the browser
- For local development over HTTP, both ws:// and wss:// protocols are supported
Tested and working in:
- Chrome 80+
- Firefox 75+
- Edge 80+
- Safari 13+