The Ultimate Guide to the ESP32 Pinout

The ESP32 is one of the most versatile microcontrollers available today. Designed for performance and flexibility, it powers everything from smart home devices to advanced IoT systems. Whether you’re a hobbyist or a professional engineer, the ESP32 offers everything you need to bring your ideas to life — seamlessly and efficiently. In this guide, you’ll learn everything about the ESP32 pinout, with the clear and structured style you expect from the world’s leading technology manuals.

What is the ESP32?

System-on-Chip (SoC): At the heart of the ESP32 lies a powerful SoC, developed by Espressif Systems. With dual-core Tensilica Xtensa LX6 processors, integrated Wi-Fi and Bluetooth, and a comprehensive suite of peripherals, the ESP32 is engineered for wireless, smart applications that require high performance and low power consumption.

Module: The ESP-WROOM-32 module integrates the ESP32 chip, a crystal oscillator, flash memory, and passive components in a compact form factor, simplifying integration into a wide range of designs.

Development Board (DevKit): The ESP32 DevKit, like the popular DevKitC, presents the module on a development board with USB interface, voltage regulation, and accessible GPIOs, making it ideal for prototyping and rapid development.

Designed for Connectivity and Control

The ESP32 supports a wide array of peripherals and features that make it uniquely adaptable to virtually any application:

  • Wi-Fi (802.11 b/g/n)
  • Bluetooth v4.2 BR/EDR and BLE
  • 34 programmable GPIOs
  • 12-bit ADCs
  • 2x 8-bit DACs
  • Capacitive touch sensors
  • SPI, I2C, UART, CAN, PWM, I2S
  • Hall-effect sensor
  • Secure encryption and cryptographic acceleration

With this range of capabilities, the ESP32 delivers seamless integration into smart homes, industrial environments, and portable devices.

ESP32 pinout diagram high resolution


** The ESP32 pinout is available for download at the end of this post in high resolution – for free!

ESP32 pinout – GPIO Fundamentals

The ESP32 provides extensive GPIO options. However, not all pins are identical. Some are designed exclusively for input, while others are optimized for special functions.

Input-Only Pins

GPIO34, GPIO35, GPIO36 (VP), GPIO39 (VN)

These pins are dedicated to input functions. They are perfect for reading sensors but cannot output signals.

ESP32 GPIO pinout overview

SPI Flash Connected Pins

Pins GPIO6 to GPIO11 are internally connected to the SPI flash memory and should not be repurposed for other applications. Proper use ensures stability and optimal performance.

ESP32 GPIO pinout overview

Advanced GPIO Features

Capacitive Touch GPIO’s

The ESP32 includes ten internal capacitive touch sensors, which measure variations in electrical charge. These can detect a human touch without mechanical movement.

  • Applications: Replace mechanical buttons, create touch-sensitive controls, or use touch events to wake the ESP32 from deep sleep.
  • Touch-enabled GPIO’s: GPIO0, GPIO2, GPIO4, GPIO12, GPIO13, GPIO14, GPIO15, GPIO27, GPIO32, GPIO33.
ESP32 GPIO pinout overview

Analog to Digital Converter (ADC)

Two ADC modules provide 12-bit precision, allowing the ESP32 to sense analog signals with fine granularity.

  • Applications: Connect temperature sensors, potentiometers, battery monitors, and more.
  • Recommendation: Use ADC1 when Wi-Fi is active, as ADC2 shares resources with the Wi-Fi module.

Digital to Analog Converter (DAC)

The ESP32 includes two 8-bit DAC channels, enabling the generation of true analog voltages.

  • Applications: Output audio tones, create analog control signals, or generate waveform outputs.
  • DAC Pins: GPIO25 (DAC1), GPIO26 (DAC2).
ESP32 GPIO pinout overview

RTC GPIO’s

Real-Time Clock (RTC) GPIO’s interface with the low-power subsystem. These pins remain active during deep sleep and can serve as external wake-up sources.

  • Applications: Wake up the device from deep sleep in energy-constrained applications.
  • RTC-enabled GPIO’s: GPIO0, GPIO2, GPIO4, GPIO12-15, GPIO25-27, GPIO32-39.

PWM (Pulse Width Modulation)

PWM allows precise control of power delivered to devices by adjusting the signal’s duty cycle.

  • Applications: Dim LED’s smoothly, control servo motors, or create audio outputs.
ESP32 GPIO pinout overview

I2C Communication

I2C (Inter-Integrated Circuit) is a synchronous protocol allowing multiple devices to communicate over two wires: SDA and SCL.

  • Applications: Connect sensors, EEPROM’s, and displays.
  • Scenarios:
    • Read from a BME280 sensor and write to an OLED display.
    • Two ESP32 boards managing a shared I2C device.

Default Pins: SDA – GPIO21, SCL – GPIO22 (but configurable).

ESP32 GPIO pinout overview

SPI Communication

SPI (Serial Peripheral Interface) is designed for high-speed communication with external devices.

  • Applications: Interface with SD cards, TFT displays, and high-speed sensors.
  • Default Pins: MOSI – GPIO23, MISO – GPIO19, SCLK – GPIO18, CS – GPIO5.

UART Communication

UART (Universal Asynchronous Receiver/Transmitter) provides serial communication between the ESP32 and other devices.

  • Applications: Connect GPS modules, debug outputs to a PC, or interface with Bluetooth modules.
  • Default Pins: TX – GPIO1, RX – GPIO3.

Interrupt Support

Every GPIO pin supports interrupts, enabling immediate response to events without continuous polling, optimizing system efficiency.

ESP32 GPIO Quick Reference Table

GPIOSpecial FunctionADCDACTouchRTCBoot State
0Strapping, TouchADC2NoYesYesLow/High
1UART0 TXNoNoNoNoHigh
2Strapping, Touch, LEDADC2NoYesYesHigh
3UART0 RXNoNoNoNoHigh
4Touch, RTCADC2NoYesYesFree
5Strapping, SPI CSADC2NoNoNoHigh
12Strapping, TouchADC2NoYesYesFree
13TouchADC2NoYesYesFree
14Touch, SPI CLKADC2NoYesYesHigh
15Strapping, Touch, SPI CSADC2NoYesYesHigh
16UART2 RXNoNoNoNoFree
17UART2 TXNoNoNoNoFree
18SPI CLKNoNoNoNoFree
19SPI MISONoNoNoNoFree
21I2C SDANoNoNoNoFree
22I2C SCLNoNoNoNoFree
23SPI MOSINoNoNoNoFree
25DAC1, RTCADC2YesNoYesFree
26DAC2, RTCADC2YesNoYesFree
27Touch, RTCADC2NoYesYesFree
32Touch, RTCADC1NoYesYesFree
33Touch, RTCADC1NoYesYesFree
34Input Only, RTCADC1NoNoYesInput Only
35Input Only, RTCADC1NoNoYesInput Only
36Input Only, RTC (VP)ADC1NoNoYesInput Only
39Input Only, RTC (VN)ADC1NoNoYesInput Only

Best Practices and Common Mistakes

Optimize your ESP32 projects by avoiding these common pitfalls:

  • Do not misuse strapping pins during boot.
  • Avoid reassigning flash SPI pins (GPIO6-GPIO11).
  • Use caution with pins that are high on boot.
  • Do not exceed 12mA current draw per GPIO.
  • Prefer ADC1 when Wi-Fi is active.
  • Always use pull-up or pull-down resistors when necessary.
  • Properly debounce input buttons.

How to Program the ESP32

Development Environments:

  • Arduino IDE (simple and accessible)
  • PlatformIO (powerful and feature-rich)
  • Espressif IDF (professional, official framework)

Programming Pins:

FunctionPinDescription
TXD0GPIO1ESP32 to PC (output)
RXD0GPIO3PC to ESP32 (input)
ENEN-pinResets the ESP32
IO0GPIO0Puts ESP32 into flashing mode

Programming Steps:

  1. Connect the ESP32 via USB.
  2. Install any required drivers (CP2102, CH340, FTDI).
  3. Select the correct board and port.
  4. Upload your code with a single click.

Modern boards automatically handle boot mode switching; on some modules, press BOOT and then EN manually.

Conclusion: Designed for What’s Next

The ESP32 is a masterclass in modern embedded design. Its combination of flexibility, power efficiency, and wireless capabilities makes it the foundation for countless groundbreaking projects. Mastering the ESP32 pinout unlocks a world of innovation — from smart home integrations to wearable devices and beyond.

Happy Building! 

Download the ESP32 pinout here in high resolution – for free*!

Free to use under the MIT license — attribution is required.

Scroll to Top