← 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.
- Power
- Ground
- GPIO
- Bus (I2C, SPI, UART)
- Special: read the note
GPIO pins
| Pin | Functions | Notes |
|---|---|---|
| GPIO 0 | ADC2_CH1, Touch 1 | Strapping pin: the BOOT button; low at reset enters download mode |
| GPIO 1TX0 | UART0 TX | USB serial and boot messages; avoid |
| GPIO 2 | ADC2_CH2, Touch 2 | Strapping pin; on-board LED on many boards |
| GPIO 3RX0 | UART0 RX | USB serial; avoid |
| GPIO 4 | ADC2_CH0, Touch 0 | Safe to use |
| GPIO 5 | VSPI CS | Strapping pin; outputs a PWM signal at boot |
| GPIO 6–11Flash | — | Connected to the SPI flash: do not use |
| GPIO 12 | ADC2_CH5, Touch 5, HSPI MISO | Strapping pin: must be low at boot, or the board may not start |
| GPIO 13 | ADC2_CH4, Touch 4, HSPI MOSI | Safe to use |
| GPIO 14 | ADC2_CH6, Touch 6, HSPI SCK | Outputs a PWM signal at boot |
| GPIO 15 | ADC2_CH3, Touch 3, HSPI CS | Strapping pin; outputs a PWM signal at boot |
| GPIO 16 | UART2 RX | Used for PSRAM on WROVER modules |
| GPIO 17 | UART2 TX | Used for PSRAM on WROVER modules |
| GPIO 18 | VSPI SCK | Safe to use |
| GPIO 19 | VSPI MISO | Safe to use |
| GPIO 21 | I2C SDA (default) | Safe to use |
| GPIO 22 | I2C SCL (default) | Safe to use |
| GPIO 23 | VSPI MOSI | Safe to use |
| GPIO 25 | ADC2_CH8, DAC1 | Safe to use |
| GPIO 26 | ADC2_CH9, DAC2 | Safe to use |
| GPIO 27 | ADC2_CH7, Touch 7 | Safe to use |
| GPIO 32 | ADC1_CH4, Touch 9 | Safe to use |
| GPIO 33 | ADC1_CH5, Touch 8 | Safe to use |
| GPIO 34 | ADC1_CH6 | Input only, no pull-up or pull-down |
| GPIO 35 | ADC1_CH7 | Input only, no pull-up or pull-down |
| GPIO 36VP | ADC1_CH0 | Input only, no pull-up or pull-down |
| GPIO 39VN | ADC1_CH3 | Input only, no pull-up or pull-down |
Power and control
| Pin | Functions | Notes |
|---|---|---|
| 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.


