The ESP32 pinout diagram maps the physical pins of the Espressif ESP32-WROOM-32 module to the breakout headers on development boards. Because the raw module exposes up to 48 pins but standard DevKit boards only break out 30 or 38, knowing exactly which GPIO maps to which header—and which pins harbor hidden hardware conflicts—is the difference between a working prototype and a boot-looping paperweight.

The Complete ESP32 DevKit Pinout Reference Table

The table below covers the standard 30-pin NodeMCU-style DevKit V1 layout, which is the most common board variant on the market. Pin numbers refer to the physical header position, starting from the top-left (USB port facing up) and moving down, then across to the right side.

Header Pin GPIO / Label Type Default Function & Critical Notes
13V3Power3.3V output from onboard regulator. Max draw ~500mA.
2ENInputEnable pin. Pull high to run, low to sleep. Internal RC delay.
3GPIO 36 (SVP)Input OnlyADC1_CH0. No internal pull-up/pull-down. High impedance.
4GPIO 39 (SVN)Input OnlyADC1_CH3. No internal pull-up/pull-down. High impedance.
5GPIO 34Input OnlyADC1_CH6. No internal pull-up/pull-down.
6GPIO 35Input OnlyADC1_CH7. No internal pull-up/pull-down.
7GPIO 32I/OADC1_CH4, Touch9, XTAL_32K_N. Safe for general use.
8GPIO 33I/OADC1_CH5, Touch8, XTAL_32K_P. Safe for general use.
9GPIO 25I/OADC2_CH8, DAC1. Warning: ADC2 conflicts with WiFi.
10GPIO 26I/OADC2_CH9, DAC2. Warning: ADC2 conflicts with WiFi.
11GPIO 27I/OADC2_CH7, Touch7. Warning: ADC2 conflicts with WiFi.
12GPIO 14I/OADC2_CH6, Touch6, MTMS. Safe if not using ADC2 with WiFi.
13GPIO 12I/OStrapping Pin. ADC2_CH5, Touch5, MTDI. See boot notes below.
14GNDGroundCommon ground reference.
15GPIO 13I/OADC2_CH4, Touch4, MTCK. Safe if not using ADC2 with WiFi.
16GPIO 9I/OConnected to flash SPI. Do not use.
17GPIO 10I/OConnected to flash SPI. Do not use.
18GPIO 11I/OConnected to flash SPI. Do not use.
195V (VIN)Power5V input from USB or external supply. Bypasses 3.3V regulator if fed backwards.
20GPIO 6I/OConnected to flash SPI. Do not use.
21GPIO 7I/OConnected to flash SPI. Do not use.
22GPIO 8I/OConnected to flash SPI. Do not use.
23GPIO 15I/OStrapping Pin. ADC2_CH3, Touch3, MTDO. Outputs PWM on boot.
24GPIO 2I/OStrapping Pin. ADC2_CH2, Touch2. Must be low/float to flash.
25GPIO 0I/OStrapping Pin. ADC2_CH1, Touch1. Pull low to enter bootloader.
26GPIO 4I/OADC2_CH0, Touch0. Safe if not using ADC2 with WiFi.
27GPIO 16I/OOften used for UART2 RX. No ADC or Touch capability.
28GPIO 17I/OOften used for UART2 TX. No ADC or Touch capability.
29GPIO 5I/OVSP_CS0. Safe for general use, outputs PWM on boot.
30GPIO 18I/OVSP_CLK. Default hardware SPI SCK.
31GPIO 19I/OVSP_MISO. Default hardware SPI MISO.
32GNDGroundCommon ground reference.
33GPIO 21I/ODefault hardware I2C SDA.
34GPIO 22I/ODefault hardware I2C SCL.
35GPIO 23I/OVSP_MOSI. Default hardware SPI MOSI.

Board Variants and Schematic Standards

When referencing an ESP32 pinout diagram, you must first identify your board variant. The table above reflects the 30-pin DevKit V1. However, the 38-pin variant (often sold as the ESP32-WROVER DevKit) breaks out additional pins, including GPIO 33 (sometimes duplicated), GPIO 35, and dedicated PSRAM pins. If you are using a 38-pin board, the physical pin numbering shifts, though the GPIO assignments remain identical to the silicon.

When reading the official Espressif schematic diagrams that accompany these pinouts, you will encounter standard IEC 60617 schematic symbols. Unlike US-standard ANSI/IEEE symbols (which use zig-zags for resistors), the IEC standard uses rectangular boxes for resistors and parallel lines for capacitors. For example, the EN pin circuit will show an IEC-standard 10kΩ rectangular resistor pulling up to 3V3, and a 1µF capacitor to GND. Recognizing these IEC symbols is critical when debugging the reset circuitry on clone boards that copy the reference design verbatim.

Rows People Get Wrong: Strapping Pins and ADC Conflicts

Bench Warning: I have seen dozens of ESP32 prototypes fail in the field because a designer tied a relay or a pull-up sensor to a strapping pin without understanding the boot sequence. Always check this list before wiring your first component.

The most common point of failure on the ESP32 is misusing the strapping pins. During the boot sequence, the ESP32 samples the voltage on specific GPIO pins to determine its operating mode. If the external circuitry forces the wrong voltage during the first 100 milliseconds of power-up, the chip will brick its own boot process.

  • GPIO 12 (MTDI): This is the most dangerous pin on the board. If GPIO 12 is pulled HIGH during boot, the ESP32 switches its internal flash voltage regulator from 3.3V to 1.8V. Since almost all DevKit boards use 3.3V SPI flash, this will cause a brownout and a continuous boot loop. Never connect a device that pulls GPIO 12 high on startup.
  • GPIO 0: Must be HIGH (or floating) to boot normally. If pulled LOW, the ESP32 enters the serial bootloader and waits for a firmware flash. If you have a button wired to GPIO 0 for user input, ensure it has a pull-up resistor and isn't pressed during power-on.
  • GPIO 2: Must be LOW or floating to boot from the internal SPI flash. If pulled HIGH, the chip attempts to boot from an SDIO interface and will fail.
  • GPIO 15: Controls debug log output. If pulled HIGH, the chip outputs boot logs at 115200 baud. If LOW, it suppresses them. It also outputs a PWM signal during the boot phase, which can accidentally trigger sensitive MOSFET gates if not isolated.

The second major trap is the ADC2 versus WiFi conflict. The ESP32's GPIO matrix documentation explicitly states that the ADC2 peripheral shares hardware resources with the WiFi radio. If your code initializes WiFi (even just to scan for networks), any attempt to read an analog value from GPIO 4, 12, 13, 14, 15, 25, 26, or 27 will fail and return garbage data. If you need analog sensors alongside WiFi, you must exclusively use ADC1 pins (GPIO 32, 33, 34, 35, 36, 39).

Identifying Pins When Markings Are Faded or Missing

Cheap clone boards from bulk marketplace orders frequently suffer from poor silkscreen printing. If your ESP32 pinout diagram is useless because the board markings are faded, you can safely map the critical pins using a digital multimeter. Never guess and apply 5V to a GPIO, as this will instantly destroy the ESP32's 3.3V logic gates.

  1. Find GND: Set your multimeter to continuity mode (the diode/beep setting). Place the black probe on the outer metal shield of the USB connector. Probe the header pins with the red probe. Any pin that yields a near-zero resistance (under 1 ohm) and beeps is a Ground pin.
  2. Find 5V (VIN) and 3V3: Power the board via USB. Switch the multimeter to DC Voltage. Place the black probe on your confirmed GND pin. Probe the remaining power-header candidates. You will read exactly 4.8V–5.2V on the VIN pin, and exactly 3.2V–3.4V on the 3V3 pin.
  3. Find EN (Enable): With power off, switch back to continuity/resistance mode. The EN pin is uniquely tied to a 10kΩ pull-up resistor (leading to 3V3) and a 1µF capacitor (leading to GND). If you measure roughly 10kΩ to the 3V3 pin, and an initial low resistance to GND that slowly climbs as the capacitor charges, you have found EN.
  4. Find the SPI Flash Pins (GPIO 6-11, 16-17): These are hardwired directly to the small silver flash chip adjacent to the main RF shield. Visually trace the microscopic PCB traces from the flash chip legs to the headers to identify and permanently mark them as 'Do Not Use' with a dab of red nail polish.

Frequently Asked Questions

Which ESP32 pins are safe to use for I2C and SPI?

While the ESP32 GPIO matrix allows you to map I2C and SPI to almost any digital pin, the hardware defaults are the safest choice to avoid library conflicts. For hardware I2C, use GPIO 21 (SDA) and GPIO 22 (SCL). For hardware SPI (VSPI), use GPIO 18 (SCK), GPIO 19 (MISO), GPIO 23 (MOSI), and GPIO 5 (CS). If you are using a 38-pin WROVER board, note that GPIO 16 and 17 are often consumed by PSRAM, forcing you to use the HSPI bus (GPIO 14, 12, 13, 15) instead.

Why does my ESP32 boot loop when I connect a sensor to GPIO 12?

GPIO 12 is a strapping pin that dictates the flash voltage. If your sensor module has an internal pull-up resistor, or if it outputs a HIGH signal during the first 100ms of power-up, the ESP32 will misinterpret this as a command to switch the flash VDD to 1.8V. Because the physical flash chip requires 3.3V, it fails to initialize, causing the ESP32 to panic and reset endlessly. Move the sensor to GPIO 13 or 14 to resolve this.

Can I use ESP32 touch pins (T0-T9) while WiFi is active?

Yes, the capacitive touch peripheral (GPIO 4, 12, 13, 14, 15, 27, 32, 33) operates independently of the WiFi radio. However, because GPIO 12, 13, 14, and 15 are also tied to the ADC2 bus, you cannot use the analog read function on those specific pins while WiFi is on. But if you strictly use the touchRead() function in the Arduino core, the touch sensor hardware will function perfectly alongside active WiFi connections.