HomeMQTT Encode/Decode

MQTT Encode/Decode

Online MQTT encode and decode tool for CONNECT, PUBLISH, SUBSCRIBE packet building and hex parsing, suitable for protocol learning and IoT integration debugging.

Paste MQTT packet data captured from Wireshark, logs, or network analyzers.

Example Packets

Decoded Result

Enter packet data and the parser runs automatically



Documentation

What is MQTT Packet Codec

This tool decodes MQTT binary packets and builds common control packets, with format conversion across hex/base64/C-array views.

Key Features

  • Decode MQTT packets into structured fields.
  • Build CONNECT/PUBLISH/SUBSCRIBE and related packets.
  • Switch input/output formats easily.
  • Inspect bytes and packet structure previews.

Steps

  1. Paste packet bytes in Decode tab and choose format.
  2. Review decoded structure and fields.
  3. Configure packet parameters in Encode tab.
  4. Copy generated output for replay/testing.

FAQ

Why does decode fail?

Usually due to wrong input format, incomplete bytes, or invalid packet structure.

Why is encoded output different from captures?

Verify flags, QoS, packet id, and payload encoding settings against actual sender behavior.