Skip to content

Send MQTT Messages in 10 Minutes Using HiveMQ Cloud Web Client

by Shashank Sharma, Andrej Schujkow
8 min read

In 2022, we introduced a web client to help you easily connect to the HiveMQ Cloud broker. This blog will show you how to get started with MQTT project using this functionality and send messages in less than 10 minutes.

The HiveMQ Web Client

An MQTT client is any device (from a microcontroller to a full-fledged server) that runs an MQTT library and connects to an MQTT broker over a network. The HiveMQ Cloud web client is a ready-to-use client within the HiveMQ Cloud user interface that helps you connect to your devices easily with the HiveMQ Cloud Broker.

How to Access the Web Client?

Once you log-in to your HiveMQ cloud and select the cluster of your choice, you can view the Web Client option on the top menu bar, as seen in the image below. You can access it by simply clicking on the navigation item.Menu bar showing the Web Client optionMenu bar showing the Web Client option

Connecting to MQTT Broker / Cluster

To securely connect to the client, you must use your credentials, i.e., a username and a password. These credentials are used to allows MQTT clients access to your MQTT broker. Manage your credentials inside the HiveMQ Cloud console under the, “Access Management.”

If you already have credentials, simply enter them and click on the “Connect Client” button.Client connection settings GUIClient connection settings GUI

​​If you don’t have credentials, no worries; you can create your credentials in a single click using the “Connect With Generated Credentials” button. Once you click it, you will get a pop-up sharing the credentials. Copy and save this for later use.Auto connect Web Client GUI Pop-upAuto connect Web Client GUI Pop-up

Clicking on the create and connect button, automatically creates credentials and connects the client to the broker.

Once connected, you will see “Web-Client Connected” displayed in green below the connection setting, as seen in the image below.Web Client connected as shown in the GUIWeb Client connected as shown in the GUI

Send Your First Message

Now that you have successfully connected the web client to the HiveMQ Cloud broker, you are ready to send your first message.

First, subscribe to a topic you want to receive messages from. You can use a specific topic name as displayed in the screenshot, or you can subscribe to all topics, using the wildcard “#”.

You can learn more about MQTT Topics, wildcards, and some best practices here.

Next, select the quality of service (QoS) you want to receive messages with. If you do not have a specific use case where you need a higher QoS, you can keep the default QoS 0 setting.

As you can see in the image, we create a topic subscription:


Once we hit the subscribe button, we can view the subscribed topic below as a list.

Subscribing to a topic using the Web Client GUISubscribing to a topic using the Web Client GUI

To receive messages, we need to publish a message with this topic. Make sure to use a topic that matches the subscription you defined earlier.


Your message can contain any information you like. In our case, we wrote a simple “Hello,” as seen in the image below. But you can also send a JSON payload, or any other format that suits your needs.

Publishing messages using the Web Client GUIPublishing messages using the Web Client GUI

Once complete, press the publish button. The message will be published to any client connected to your broker that has subscribed to this topic.

You can view this message inside the web client with the corresponding topic, QoS, and timestamp below the publish button.

Publish button publishes any message contained in the topicPublish button publishes any message contained in the topic

You can also connect from any other device to your HiveMQ Cloud cluster using the same credentials and use it to subscribe to topics from the Web Client. In our case, we can use MQTT CLI (Command Line Interface) to receive messages sent using GUI. To learn more about MQTT CLI, please check out HiveMQ Cloud getting started with MQTT CLI section.

The screenshot shows MQTT CLI on a local device subscribing to same topic as the web clientThe screenshot shows MQTT CLI on a local device subscribing to same topic as the web client

If you’ve followed these steps, you should now be able to connect your web client to your HiveMQ Cloud cluster and use it to publish and receive messages.

Get Started

To access the HiveMQ Cloud Web Client, all you need to do is sign up for HiveMQ Cloud.

Get started with a complete MQTT platform for testing and small-scale IoT projects. Enjoy a 15-day free trial with exclusive features like unlimited connections, up to 1MB/s data throughput, 99.95% uptime, 24/7 support, client certificate authentication, and more.

Try HiveMQ Cloud Starter

Were you able to successfully follow these steps to connect your web client to your HiveMQ Cloud cluster? Did you face any problems along the way? Did you make/take any alternate steps? Contact us for any feedback.

Shashank Sharma

Shashank Sharma is a product marketing manager at HiveMQ. He is passionate about technology, supporting customers, and enabling developer-centric workflows. He focuses on the HiveMQ Cloud offerings and has previous experience in application software tooling, autonomous driving, and numerical computing.

  • Contact Shashank Sharma via e-mail

Andrej Schujkow

Andrej is Senior Frontend Engineer at HiveMQ. He loves to create complex web applications in a simple fashion, enable developers and career changers, reverse engineer legacy features and absorb the latest frontend tech.

  • Contact Andrej Schujkow via e-mail
HiveMQ logo
Review HiveMQ on G2