Skip to content
Voltomni
← Pinout library

ESP32 GPIO pinout and pin functions

This table covers the original ESP32 chip, used on DevKitC, DOIT DevKit V1, WROOM-32 boards and the ESP32-CAM. Boards place the pins differently, so match by the GPIO number printed next to each pin. The ESP32-S3, C3 and C6 have different pin maps.

GPIO pins

PinFunctionsNotes
GPIO 0ADC2_CH1, Touch 1Strapping pin: the BOOT button; low at reset enters download mode
GPIO 1TX0UART0 TXUSB serial and boot messages; avoid
GPIO 2ADC2_CH2, Touch 2Strapping pin; on-board LED on many boards
GPIO 3RX0UART0 RXUSB serial; avoid
GPIO 4ADC2_CH0, Touch 0Safe to use
GPIO 5VSPI CSStrapping pin; outputs a PWM signal at boot
GPIO 6–11Flash—Connected to the SPI flash: do not use
GPIO 12ADC2_CH5, Touch 5, HSPI MISOStrapping pin: must be low at boot, or the board may not start
GPIO 13ADC2_CH4, Touch 4, HSPI MOSISafe to use
GPIO 14ADC2_CH6, Touch 6, HSPI SCKOutputs a PWM signal at boot
GPIO 15ADC2_CH3, Touch 3, HSPI CSStrapping pin; outputs a PWM signal at boot
GPIO 16UART2 RXUsed for PSRAM on WROVER modules
GPIO 17UART2 TXUsed for PSRAM on WROVER modules
GPIO 18VSPI SCKSafe to use
GPIO 19VSPI MISOSafe to use
GPIO 21I2C SDA (default)Safe to use
GPIO 22I2C SCL (default)Safe to use
GPIO 23VSPI MOSISafe to use
GPIO 25ADC2_CH8, DAC1Safe to use
GPIO 26ADC2_CH9, DAC2Safe to use
GPIO 27ADC2_CH7, Touch 7Safe to use
GPIO 32ADC1_CH4, Touch 9Safe to use
GPIO 33ADC1_CH5, Touch 8Safe to use
GPIO 34ADC1_CH6Input only, no pull-up or pull-down
GPIO 35ADC1_CH7Input only, no pull-up or pull-down
GPIO 36VPADC1_CH0Input only, no pull-up or pull-down
GPIO 39VNADC1_CH3Input only, no pull-up or pull-down

Power and control

PinFunctionsNotes
3V33.3 V—Regulator output; or a clean 3.3 V input instead of USB
VIN / 5V5 V—5 V from USB, or a 5 V input to the regulator
GNDGround—
ENEnable—Pull low to reset (the EN or RST button)

Good to know

  • All GPIO pins are 3.3 V and are not 5 V tolerant.
  • ADC2 pins cannot read analog values while Wi-Fi is on. For analog inputs in a Wi-Fi project, use the ADC1 pins: GPIO 32–39.
  • The ADC is not linear near 0 V and 3.3 V. For accurate readings, keep the input between about 0.1 V and 3.1 V or use an external ADC such as the ADS1115.
  • Any output pin can generate PWM (LEDC), and I2C and SPI can be moved to most pins in code; the pins above are the defaults.
  • Avoid connecting circuits that pull the strapping pins (0, 2, 5, 12, 15) high or low at reset, or the board may fail to boot or upload.

Boards with this pinout

More pinouts

Raspberry Pi GPIO pinout (40-pin header)Arduino Nano pinout