wolfMQTT Client Library

MQTT (Message Queuing Telemetry Transport) is a lightweight open messaging protocol that was developed for constrained environments such as M2M (Machine to Machine) and IoT (Internet of Things), where a small code footprint is required. MQTT is based on the Pub/Sub messaging principle of publishing messages and subscribing to topics. The protocol efficiently packs messages to minimize overhead. The MQTT specification recommends TLS as a transport option to secure the protocol using port 8883 (secure-mqtt), as the MQTT protocol does not provide security on its own. Constrained devices can benefit from using TLS session resumption to reduce the reconnection cost.

The wolfMQTT library is a client implementation of the MQTT written in C for embedded use. It supports SSL/TLS via the wolfSSL library. From this, it can provide the security that the MQTT protocol lacks. wolfMQTT was built from the ground up to be multi-platform, space conscious and extensible. It supports all Packet Types, all Quality of Service (QoS) levels 0-2 and supports SSL/TLS using the wolfSSL library. This implementation provides support for MQTT v5.0 and MQTT v3.1.1. Additionally, there is also client support for MQTT-SN (Sensor Network).

wolfMQTT is built for maximum portability, and is generally very easy to compile on new platforms. If your desired platform is not listed under the supported operating environments, please contact wolfSSL at

Download Now
Get the latest open source GPLv2 version now!

Version:  1.19.0
Release Date: 3/22/2024
View ChangeLog


  • Supports MQTT specs v3.1.1 and v5.0
  • QoS Levels 0-2
  • Support for TCP or TLS
  • Message integrity, security are still available (via the wolfSSL library)
  • Examples Available
  • Support Available


  • Small size: 3.6kB
  • Able to leverage lightweight wolfSSL embedded SSL/TLS library


  • Simple API
  • Written in native C89
  • Minimal external dependencies
  • Less than 1200 lines of code

Platform and Language Support

wolfMQTT is built for maximum portability and is generally very easy to compile on new platforms.  If your desired platform is not listed under the supported operating environments, please contact us.

wolfMQTT supports the C programming language as a primary interface. If you have interest in using wolfMQTT in another programming language that it does not currently supported, please contact us.

Commercial Support

Support packages for wolfMQTT are available on an annual basis directly from wolfSSL.  With three different package options, you can compare them side-by-side and choose the package that best fits your specific needs.  Please see our Support Packages page for more details or contact us with any questions.

wolfSSL Training Course

Interested in getting trained by security experts on subjects related to wolfSSL and SSL/TLS?  Learn more.


  • Built from scratch by wolfSSL engineers
  • Supports MQTT specifications v3.1.1 and v5.0
  • Support for MQTT-SN
  • Supports all client side packet types and protocol options
  • QoS Levels 0-2 (guaranteed delivery)
  • Message integrity, security are still available
  • Supports plain TCP or TLS (via the wolfSSL library)
  • Single threaded model and single message callback
  • Written in Native C89 with portability/compatibility in mind
  • Space conscience design (Compiled size is about 3.6kB)
  • User manual with build instructions, example overview, and API documentation
  • Example MQTT client implementations
  • Network interface is abstracted via callbacks for extensibility
  • Packet parsing encoding/decoding structured for custom use
  • Minimal external dependencies (strlen, memcpy, memset)
  • Detailed error checking/handling
  • Doxygen style inline documentation
  • Less than 1200 lines of well structured C code
  • Tested on multiple variants of MQTT broker servers, QoS levels 0-2 with/without TLS
  • Tested on Linux, Mac OS X, and Freescale Kinetis K64
  • Inherits wolfSSL library features such as lightweight TLS using ChaCha20/Poly1305 AEAD, small size and portability
  • Open source (GPLv2)
  • FreeRTOS+TCP support
  • Example Arduino IDE project
  • IBM Watson IoT Example with IBM developer recipe
  • IBM Watson IoT Platform is a supported cloud provider
  • Example UART interface for wolfMQTT

Supported Chipmakers

Supported Operating Environments

  • Win32/64, Linux, Mac OS X, Solaris, ThreadX, VxWorks, FreeBSD, NetBSD, OpenBSD, embedded Linux, Yocto Linux, OpenEmbedded, WinCE, Haiku, OpenWRT, iPhone (iOS), Android, Nintendo Wii and Gamecube through DevKitPro, QNX, MontaVista, NonStop, TRON/ITRON/µITRON, Cesium, Micrium µC/OS-III, FreeRTOS, SafeRTOS, NXP/Freescale MQX, Nucleus, TinyOS, HP/UX, AIX, ARC MQX, TI-RTOS, uTasker, embOS, INtime, Mbed, uT-Kernel, RIOT, CMSIS-RTOS, FROSTED, Green Hills INTEGRITY, Keil RTX, TOPPERS, PetaLinux, Apache Mynewt, PikeOS
  • If you would like to test wolfSSL on another environment, let us know and we’ll be happy to support you.

Licensing and Ordering:

wolfMQTT is dual licensed under both the GPLv2 and commercial licensing.  For more information, please see the following links.