Home / Pinout / ESP32
ESP32 pinout & GPIO reference
The original ESP32: highest shipping volume and the deepest documentation. GPIO 6–11 are taken by internal flash, GPIO 34–39 are input-only, and ADC2 is unavailable while Wi-Fi is active — the three traps every newcomer hits.
Data verified:2026-10-20 · Cross-checked against Espressif datasheets and the ESP-IDF programming guide. Always confirm with the official document before finalizing a design.
Official documentation:link 1
Key specifications
| Core | Xtensa LX6 dual-core (+1 ULP co-processor) |
|---|---|
| Clock | 80 / 160 / 240 MHz configurable |
| SRAM | 520 KB |
| Wireless | Wi-Fi 802.11 b/g/n · Bluetooth 4.2 + BLE |
| USB | No native USB — external USB-UART bridge required |
| ADC | 2 × 12-bit SAR, 18 channels total |
| DAC | 2 × 8-bit (GPIO25 / GPIO26) |
| Touch | 10 capacitive touch channels |
| GPIO | 0–39 (~26 actually usable) |
| Security | Secure Boot · Flash encryption · AES/SHA/RSA acceleration |
Traps that cost you a board respin
- GPIO 6–11 connect to the internal SPI flash and must never be used as ordinary GPIO.
- GPIO 34 / 35 / 36 / 39 are input-only and have no internal pull-up.
- ADC2 (GPIO 0/2/4/12–15/25–27) is occupied while Wi-Fi runs — use ADC1 instead.
- GPIO 12 (MTDI) is a strapping pin: pulling it high changes the boot voltage. Check it first when boot fails.
Full GPIO table
| GPIO | Status | Alternate functions |
|---|---|---|
GPIO0 | Usable | ADC2_CH1TOUCH1 |
GPIO1 | Usable | UART0 TX |
GPIO2 | Usable | ADC2_CH2TOUCH2 |
GPIO3 | Usable | UART0 RX |
GPIO4 | Usable | ADC2_CH0TOUCH0 |
GPIO5 | Usable | VSPI CS0 |
GPIO6 | Unusable | Internal SPI flash |
GPIO7 | Unusable | Internal SPI flash |
GPIO8 | Unusable | Internal SPI flash |
GPIO9 | Unusable | Internal SPI flash |
GPIO10 | Unusable | Internal SPI flash |
GPIO11 | Unusable | Internal SPI flash |
GPIO12 | Usable | ADC2_CH5TOUCH5HSPI MISOJTAG TDI |
GPIO13 | Usable | ADC2_CH4TOUCH4HSPI MOSIJTAG TCK |
GPIO14 | Usable | ADC2_CH6TOUCH6HSPI SCLKJTAG TMS |
GPIO15 | Usable | ADC2_CH3TOUCH3HSPI CS0JTAG TDO |
GPIO16 | Usable | UART2 RX |
GPIO17 | Usable | UART2 TX |
GPIO18 | Usable | VSPI SCLK |
GPIO19 | Usable | VSPI MISO |
GPIO20 | Unusable | Not exposed |
GPIO21 | Usable | I²C SDA (default) |
GPIO22 | Usable | I²C SCL (default) |
GPIO23 | Usable | VSPI MOSI |
GPIO24 | Unusable | Not exposed |
GPIO25 | Usable | DAC1ADC2_CH8 |
GPIO26 | Usable | DAC2ADC2_CH9 |
GPIO27 | Usable | ADC2_CH7TOUCH7 |
GPIO28 | Unusable | Not exposed |
GPIO29 | Unusable | Not exposed |
GPIO30 | Unusable | Not exposed |
GPIO31 | Unusable | Not exposed |
GPIO32 | Usable | ADC1_CH4TOUCH9 |
GPIO33 | Usable | ADC1_CH5TOUCH8 |
GPIO34 | Input only | ADC1_CH6 · input only |
GPIO35 | Input only | ADC1_CH7 · input only |
GPIO36 | Input only | ADC1_CH0 · input only |
GPIO37 | Unusable | ADC1_CH1 · usually tied to flash |
GPIO38 | Unusable | ADC1_CH2 · usually tied to flash |
GPIO39 | Input only | ADC1_CH3 · input only |
Individual GPIO pages
ESP32 GPIO0Details, cautions and sample codeESP32 GPIO2Details, cautions and sample codeESP32 GPIO12Details, cautions and sample codeESP32 GPIO15Details, cautions and sample codeESP32 GPIO34Details, cautions and sample code
Related
ESP32-S3 PinoutXtensa LX7 dual-core · native USB · vector extensionsESP32-C3 PinoutRISC-V single-core · low cost · native USBESP32-S2 PinoutXtensa LX7 single-core · native USB OTG · no BluetoothESP32-C6 PinoutRISC-V dual-core · Wi-Fi 6 · Thread / Zigbee / MatterESP32-H2 PinoutRISC-V 96 MHz · no Wi-Fi · low-power Thread / Zigbee nodeESP32-P4 PinoutRISC-V dual-core 400 MHz · 55 GPIOs · MIPI-CSI/DSI · no wireless
Chip comparisonESP32 / S2 / S3 / C3 / C6 / H2 / P4
Peripheral guidesI²C · SPI · UART · RMT · LEDC · deep sleep