ESP32 Arduino: Base64 encoding (using crypto/base64 lib) @techtutorialsx11
ESP32 Arduino: Base64 encoding (using crypto/base64 lib)  @techtutorialsx11
Uploaded December 2018 | Updated September 2026, 1 week ago
This tutorial explains how to encode a plain text string into base64 format, using the ESP32 and the Arduino core.

**IMPORTANT NOTE**: as indicated in the implementation file of the library, the caller is responsible for freeing the returned buffer with the encoded string. So, although not included in the video, you should call the free function on the returned pointer when you no longer need it.

Implementation file: github.com/espressif/esp-idf/blob/aaf12390eb14b95589acd98db5c268a2e56bb67e/components/wpa_supplicant/src/wpa2/utils/base64.c

Free function: en.cppreference.com/w/c/memory/free

Base64 encode online tool: base64encode.org
Base64 decode online tool: base64decode.org

Format specifiers: cplusplus.com/reference/cstdio/printf


Related content (written tutorials):
Base64 encoding: techtutorialsx.com/2017/12/09/esp32-arduino-base64-enconding
Base64 decoding: techtutorialsx.com/2018/11/27/esp32-arduino-base64-decoding
HMAC SHA256: techtutorialsx.com/2018/01/25/esp32-arduino-applying-the-hmac-sha-256-mechanism
AES ECB mode: techtutorialsx.com/2018/04/18/esp32-arduino-encryption-using-aes-128-in-ecb-mode


A lot more ESP32 tutorials:
techtutorialsx.com/category/esp32

ESP8266 tutorials:
techtutorialsx.com/category/esp8266
ESP32 Arduino: Base64 encoding (using crypto/base64 lib)ESP32 HTTP/2: Add query parameters to GET requestESP32 MicroPython: Hello WorldESP32 Arduino: connecting to a WiFi networkESP32 / ESP8266 cpplinq: The Any operatorESP32 Arduino HTTP web server: multiple server instancesESP32 Camera -  Image serverESP32 Arduino FAT file system: write fileESP32: Getting started with WebSerialESP8266: HTTP POST RequestsESP32 web server: Controlling HTTP methods allowedESP32 Arduino HTTP web server: redirects
Techtutorialsx |

ESP32 Arduino: Base64 encoding (using crypto/base64 lib)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER