---
title: "MQTT Connectivity: TCP, TLS, WebSockets & MQTT 5 | ConnectMQ"
description: "Connect devices, services and browsers to one MQTT broker: MQTT 3.1.1 and MQTT 5 over TCP, TLS, WebSockets and secure WebSockets."
url: "https://connectmq.com/connectivity/"
language: "en"
---

Connectivity

# One broker, every kind of client

Firmware usually speaks MQTT over TCP or TLS; browsers need WebSockets. ConnectMQ listens on all four, so devices, services and dashboards share the same topics.

[Try it free](https://app.connectmq.com/signup) [Quickstart](https://connectmq.com/developers/)

No card required

broker.connectmq.com connected

-   **Sensors**site/+/telemetry
-   **Gateways**gw/+/status
-   **Vehicles**fleet/+/gps

**ConnectMQ**MQTT 3.1.1 · 5

-   **Dashboards**
-   **Backend services**
-   **Storage & analytics**

TLSWebSocketsPer-topic ACLsPrivate instance

MQTT**1883**`mqtt://broker.connectmq.com:1883`TCP

MQTT over TLS**8883**`mqtts://broker.connectmq.com:8883`TCP + TLS

WebSocket**8083**`ws://broker.connectmq.com:8083/mqtt`Browsers (HTTP pages)

Secure WebSocket**8084**`wss://broker.connectmq.com:8084/mqtt`Browsers (HTTPS pages)

Shown: the public shared endpoint. Your private broker’s connection details are in your dashboard.

Standard MQTT

## Every MQTT feature your devices expect

ConnectMQ implements the MQTT specification, not a proprietary dialect — so your existing client libraries, firmware and tools keep working.

-   Publish / subscribe with + and # wildcards
-   QoS levels for at-most-once and at-least-once delivery
-   Retained messages for last-known state
-   Last Will and Testament for presence detection
-   Persistent sessions for clients that reconnect
-   MQTT 5 reason codes and properties

## Connectivity FAQ

Which port should I use?

Use 8883 (MQTT over TLS) for devices and services, and 8084 (secure WebSockets, path /mqtt) for browser apps. 1883 and 8083 are unencrypted and meant for quick tests only.

Can browser applications connect directly?

Yes. ConnectMQ exposes MQTT over secure WebSockets (wss), which is what browser MQTT clients such as MQTT.js use.

Do I need a special SDK?

No. ConnectMQ speaks standard MQTT 3.1.1 and MQTT 5, so any MQTT client library works.

Platform

## More in every ConnectMQ workspace

[

### Dashboard & monitoring

Live topic cards, signals and ISA-95 workspace

Learn more](https://connectmq.com/monitoring/)[

### Rules & alerts

Threshold rules, alert log and notifications

Learn more](https://connectmq.com/rules-alerts/)[

### Digital Twin

Your factory in 3D with live MQTT telemetry

Learn more](https://connectmq.com/digital-twin/)

## Your private MQTT broker is a few clicks away

Create an account, get your broker credentials and connect your first device — no servers to install, patch or scale.

[Get started](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

## Articles

[All articles](https://connectmq.com/blog/)

IoT Tutorials

### [MQTT over WebSocket: Connect a Browser to an MQTT Broker with MQTT.js](https://connectmq.com/blog/mqtt-over-websocket/)

Browsers cannot open raw TCP sockets, so web apps speak MQTT over WebSocket. Build a working browser client and a Node.js client against broker.connectmq.com and learn how to fix the most common connection errors.

September 29, 20268 min read

MQTT Fundamentals

### [MQTT 5 Features That Matter in Practice: Reason Codes, Shared Subscriptions, Expiry and More](https://connectmq.com/blog/mqtt-5-features/)

MQTT 5 is more than a version bump. Learn the features that change how you build IoT systems, from reason codes and expiry to shared subscriptions and request/response, with hands-on examples.

September 22, 20269 min read

MQTT Fundamentals

### [MQTT QoS Levels Explained: QoS 0, 1 and 2 with Packet Flows and Examples](https://connectmq.com/blog/mqtt-qos-levels-explained/)

A practical guide to MQTT QoS: how QoS 0, 1 and 2 work on the wire, why the delivered QoS can be lower than you asked for, how sessions queue messages and which level to choose for each use case.

August 20, 20269 min read
