Back to Tools

ESP32, Arduino and Raspberry Pi Pinouts

Interactive pin diagrams for the ESP32 DevKitC, Arduino Uno and Nano, Raspberry Pi Pico and the Raspberry Pi 40-pin header, checked pin by pin against the official documents. Hover a pin to see what it can do and what to avoid.

ESP32 pinout: ESP32-DevKitC V4 (38 pins)

Espressif's own ESP32 development board with an ESP32-WROOM-32 module. Most 38-pin "ESP32 DevKit" boards copy this layout, but clones do move pins around, so compare the labels printed on your board.

ESP32-DevKitC V4ESP32-WROOM-32USB-UARTUSB3V3ENVPVNIO34IO35IO32IO33IO25IO26IO27IO14IO12GNDIO13D2D3CMD5VGNDIO23IO22TXRXIO21GNDIO19IO18IO5IO17IO16IO4IO0IO2IO15D1D0CLK

Top view, antenna up, Micro-USB at the bottom.

Key facts: ESP32-DevKitC V4

Logic level
3.3 V. Input high is 0.75 × VDD up to VDD + 0.3 V; the pins are not 5 V tolerant.
Current per pin
About 40 mA sourced and 28 mA sunk at the strongest drive setting, dropping to about 29 mA sourced when many pins drive at once. The default drive strength is about 20 mA. The datasheet gives no per-pin absolute maximum.
Total IO current
1,200 mA for all IO pins together (absolute maximum).
Powering it
Micro-USB, the 5V pin or the 3V3 pin. Use exactly one: two at once can damage the board or the supply.
Peripherals
UART, SPI, I2C and PWM can be routed to almost any GPIO through the GPIO matrix. The pins shown are the defaults.

Pins to avoid or treat with care

  • GPIO6–11 (CLK, D0–D3, CMD): wired to the flash chip.
  • GPIO34–39 (VP, VN, IO34, IO35): inputs only, no pull-ups.
  • GPIO0, 2, 5, 12 and 15: strapping pins, careful what pulls them at reset. GPIO12 high at power-on is the classic "won't boot".
  • GPIO1 and 3 (TX, RX): the USB serial link.
  • ADC2 pins (GPIO0, 2, 4, 12–15, 25–27) while Wi-Fi is on.

ESP32-DevKitC V4 pin table

38 of 38 pins
All pins of the ESP32-DevKitC V4
PositionPinIn codeFunctionsNotes
J2 pin 1––3.3 V rail from the board's AMS1117-3.3 regulator. It can also power the board from a 3.3 V supply, but then nothing else may power it (no USB, nothing on 5V). The guide gives no current limit for loads on this pin.
J2 pin 2––CHIP_PUChip enable (CHIP_PU). High runs the ESP32, low holds it in reset. The board pulls it up with 10 kΩ and the EN button pulls it to ground.
J2 pin 3GPIO36ADC1_CH0SENSOR_VP, RTC_GPIO0Input onlyInput only. GPIO34–39 have no output driver and no internal pull-up or pull-down, so a button needs an external resistor.
J2 pin 4GPIO39ADC1_CH3SENSOR_VN, RTC_GPIO3Input onlyInput only. GPIO34–39 have no output driver and no internal pull-up or pull-down, so a button needs an external resistor.
J2 pin 5GPIO34ADC1_CH6VDET_1, RTC_GPIO4Input onlyInput only. GPIO34–39 have no output driver and no internal pull-up or pull-down, so a button needs an external resistor.
J2 pin 6GPIO35ADC1_CH7VDET_2, RTC_GPIO5Input onlyInput only. GPIO34–39 have no output driver and no internal pull-up or pull-down, so a button needs an external resistor.
J2 pin 7GPIO32ADC1_CH4, TOUCH9, PWMXTAL_32K_P, RTC_GPIO9Also the input of an optional 32.768 kHz crystal. The DevKitC has none fitted, so the pin is free.
J2 pin 8GPIO33ADC1_CH5, TOUCH8, PWMXTAL_32K_N, RTC_GPIO8
J2 pin 9GPIO25ADC2_CH8, DAC_1, PWMRTC_GPIO6ADC2 is shared with Wi-Fi: ADC2 readings fail while Wi-Fi is running. Use an ADC1 pin (GPIO32–39) in Wi-Fi projects.
J2 pin 10GPIO26ADC2_CH9, DAC_2, PWMRTC_GPIO7ADC2 is shared with Wi-Fi: ADC2 readings fail while Wi-Fi is running. Use an ADC1 pin (GPIO32–39) in Wi-Fi projects.
J2 pin 11GPIO27ADC2_CH7, TOUCH7, PWMRTC_GPIO17ADC2 is shared with Wi-Fi: ADC2 readings fail while Wi-Fi is running. Use an ADC1 pin (GPIO32–39) in Wi-Fi projects.
J2 pin 12GPIO14ADC2_CH6, TOUCH6, HSPI SCK, PWMMTMS (JTAG), RTC_GPIO16ADC2 is shared with Wi-Fi: ADC2 readings fail while Wi-Fi is running. Use an ADC1 pin (GPIO32–39) in Wi-Fi projects.
J2 pin 13GPIO12ADC2_CH5, TOUCH5, HSPI MISO, PWMMTDI (JTAG), RTC_GPIO15StrappingStrapping pin (MTDI). At reset it picks the flash supply voltage: low gives 3.3 V, high gives 1.8 V. It has an internal pull-down; keep it low at power-on or the board may not boot.
J2 pin 14––
J2 pin 15GPIO13ADC2_CH4, TOUCH4, HSPI MOSI, PWMMTCK (JTAG), RTC_GPIO14ADC2 is shared with Wi-Fi: ADC2 readings fail while Wi-Fi is running. Use an ADC1 pin (GPIO32–39) in Wi-Fi projects.
J2 pin 16GPIO9–SD_DATA2, SPIHD, U1RXDFlashWired to the module's SPI flash. Don't use it: anything connected here can stop the ESP32 reading its own program.
J2 pin 17GPIO10–SD_DATA3, SPIWP, U1TXDFlashWired to the module's SPI flash. Don't use it: anything connected here can stop the ESP32 reading its own program.
J2 pin 18GPIO11–SD_CMD, SPICS0, U1RTSFlashWired to the module's SPI flash. Don't use it: anything connected here can stop the ESP32 reading its own program.
J2 pin 19––5 V rail that feeds the board's 3.3 V regulator. USB feeds it through a Schottky diode, so on USB power it reads a little under 5 V. Power the board from USB, this pin or the 3V3 pin, only one at a time.
J3 pin 1––
J3 pin 2GPIO23VSPI MOSI, PWM
J3 pin 3GPIO22SCL, PWMVSPIWP, U0RTSSCL is the Arduino core's default I2C clock pin. The ESP32 can route I2C to almost any GPIO.
J3 pin 4GPIO1UART0 TXU0TXD, CLK_OUT3USB serialConnected through a 0 Ω resistor to the USB-to-UART chip that uploads code and carries Serial Monitor. Anything else on this pin can interfere with uploading.
J3 pin 5GPIO3UART0 RXU0RXD, CLK_OUT2USB serialConnected through a 0 Ω resistor to the USB-to-UART chip that uploads code and carries Serial Monitor. Anything else on this pin can interfere with uploading.
J3 pin 6GPIO21SDA, PWMVSPIHDSDA is the Arduino core's default I2C data pin. The ESP32 can route I2C to almost any GPIO.
J3 pin 7––
J3 pin 8GPIO19VSPI MISO, PWMU0CTS
J3 pin 9GPIO18VSPI SCK, PWM
J3 pin 10GPIO5VSPI CS, PWMStrappingStrapping pin. With GPIO15 it sets the SDIO slave timing at reset (internal pull-up). That only matters when the ESP32 runs as an SDIO slave, so it's fine for most projects.
J3 pin 11GPIO17UART2 TX, PWMFree on boards with an ESP32-WROOM or ESP32-SOLO module. On DevKitC boards with an ESP32-WROVER module this pin is used inside the module.
J3 pin 12GPIO16UART2 RX, PWMFree on boards with an ESP32-WROOM or ESP32-SOLO module. On DevKitC boards with an ESP32-WROVER module this pin is used inside the module.
J3 pin 13GPIO4ADC2_CH0, TOUCH0, PWMHSPIHD, RTC_GPIO10ADC2 is shared with Wi-Fi: ADC2 readings fail while Wi-Fi is running. Use an ADC1 pin (GPIO32–39) in Wi-Fi projects.
J3 pin 14GPIO0ADC2_CH1, TOUCH1, PWMCLK_OUT1, RTC_GPIO11StrappingStrapping pin. Low at reset starts the serial bootloader (download mode) instead of your program. It has an internal pull-up; don't let a circuit pull it low at power-on.
J3 pin 15GPIO2ADC2_CH2, TOUCH2, PWMHSPIWP, RTC_GPIO12StrappingStrapping pin. It must be low or floating when GPIO0 is low at reset, or the board won't enter download mode. It has an internal pull-down.
J3 pin 16GPIO15ADC2_CH3, TOUCH3, HSPI CS, PWMMTDO (JTAG), RTC_GPIO13StrappingStrapping pin (MTDO). Low at reset silences the boot messages on UART0, and with GPIO5 it sets the SDIO slave timing. It has an internal pull-up.
J3 pin 17GPIO8–SD_DATA1, SPID, U2CTSFlashWired to the module's SPI flash. Don't use it: anything connected here can stop the ESP32 reading its own program.
J3 pin 18GPIO7–SD_DATA0, SPIQ, U2RTSFlashWired to the module's SPI flash. Don't use it: anything connected here can stop the ESP32 reading its own program.
J3 pin 19GPIO6–SD_CLK, SPICLK, U1CTSFlashWired to the module's SPI flash. Don't use it: anything connected here can stop the ESP32 reading its own program.

Sources for the ESP32-DevKitC V4

How to read these pin diagrams

Every board is drawn from the top, the way you see it on the bench, with the pins in their real order. Red pins are power, black are ground, grey are control pins such as reset, and green are general-purpose I/O. A yellow ring marks a pin with a catch: a strapping pin that changes how the chip boots, a pin wired to flash or USB, or an input-only pin.

Pick a function above the drawing (I2C, SPI, ADC…) to light up the pins that can do it and see each pin's name for that function. Pins marked default are the ones the board's own documentation uses; on the ESP32 and the Pico most peripherals can move to other pins in software.

The label printed on the board, the physical pin number and the number you type in code are often three different things. On a Raspberry Pi, physical pin 11 is GPIO17. On an ESP32 the board says IO32 and the code says 32. The table under each drawing lists all three.

3.3 V or 5 V: logic levels and current limits

BoardLogic level5 V on a GPIO?Current per pinAll pins together
ESP32-DevKitC3.3 VNo (3.6 V max)~20 mA default, ~40 mA max drive1,200 mA (abs. max)
Arduino Uno R3, Nano5 VYes20 mA (40 mA abs. max)200 mA (abs. max)
Raspberry Pi Pico3.3 VNo2–12 mA, 4 mA default50 mA
Raspberry Pi (40-pin header)3.3 VNo16 mA50 mA

The ESP32, the Pico and the Raspberry Pi run their pins at 3.3 V and none of them is 5 V tolerant. A 5 V sensor output on one of their GPIOs needs a level shifter or a resistor divider. The Arduino Uno and Nano run at 5 V; most 3.3 V modules need their inputs shifted down when you connect them to an Arduino.

The current limits are for the I/O pins, not for driving motors or relays. A small indicator LED is fine on any of these boards with a series resistor that keeps it under the pin's limit; anything bigger goes through a transistor or a driver. The LED resistor calculator works out the resistor.

Questions people ask

Which ESP32 pins are safe to use?
On an ESP32-DevKitC with a WROOM module, GPIO4, 13, 14, 16–19, 21–23, 25–27, 32 and 33 are full input/output pins with no boot role. GPIO34–39 are fine as inputs. Leave GPIO6–11 alone (flash), keep GPIO1 and 3 for USB serial, and check what your circuit does to GPIO0, 2, 5, 12 and 15 at reset.
Why won't my ESP32 boot or upload?
Usually a strapping pin. GPIO0 pulled low at reset starts the bootloader instead of your program. GPIO12 pulled high switches the flash to 1.8 V. GPIO2 pulled high stops the board entering download mode. Move whatever is on those pins, or make sure it doesn't pull them the wrong way while the board resets.
Can I use ADC2 with Wi-Fi on?
No. The ESP32's Wi-Fi driver uses ADC2, so readings from ADC2 pins (GPIO0, 2, 4, 12–15, 25–27) fail while Wi-Fi is running. Use the ADC1 pins: GPIO32–36 and 39.
Is the ESP32-S3 or ESP32-C3 pinout the same?
No. The S3 and C3 are different chips with different GPIO numbers, ADC channels and strapping pins, and their dev boards have their own layouts. Don't use the ESP32 pinout above for them; use Espressif's guide for your exact board.
Which Arduino Uno pins are PWM?
Pins 3, 5, 6, 9, 10 and 11, marked with a ~ on the board. They run at about 490 Hz, except 5 and 6 at about 980 Hz. The same pins are PWM on the Nano.
Which pins are interrupts on an Uno or Nano?
attachInterrupt() works on pins 2 and 3 (INT0 and INT1). D0 to D13 and A0 to A5 also have pin-change interrupts (PCINT), which attachInterrupt() doesn't use.
What are A6 and A7 on the Nano?
Two extra analog inputs the Uno doesn't have. They are analog only: analogRead() works, but digitalRead(), digitalWrite() and pinMode() don't, and there is no pull-up.
Are Raspberry Pi GPIO pins 5 V tolerant?
No. Raspberry Pi GPIO pins are 3.3 V only, and 5 V on one can permanently damage the processor. The two 5V pins on the header are power pins, not signals.
Raspberry Pi: physical pin numbers or GPIO numbers?
Code uses the GPIO numbers (also called BCM numbers), such as GPIO17. The physical numbers 1 to 40 count across the header, odd pins on one row and even on the other, starting at the 3.3 V pin. GPIO17 is physical pin 11.
Does the Raspberry Pi Pico 2 have the same pinout?
The header layout and the power pins are the same. The chip is the RP2350 instead of the RP2040, with different electrical limits, so check the Pico 2 datasheet before relying on the numbers on this page.

Related tools and guides

Describe a circuit. Get a board you can order.

GrandpaCAD's chat picks real parts, draws the schematic, routes the PCB and checks it against JLCPCB's rules. You get Gerbers, BOM, pick-and-place, a KiCad project and a 3D board, plus a printed case if you want one.

"ESP32 board with a BME280 sensor on I2C and a USB-C port"

3 free generations, no card required