Skip to content

Guide

ESP32 Pinout Guide: Every GPIO, ADC, PWM, and Restricted Pin Explained

Complete ESP32 pinout guide covering all GPIOs, input-only pins, strapping pins, flash-reserved pins, dual ADC channels, PWM via LEDC, I2C, SPI, UART, and deep sleep wake pins.

  • 16 min read
  • Updated November 21, 2026
ESP32 Pinout Guide: Every GPIO, ADC, PWM, and Restricted Pin Explained

Ask five people what the ESP32 pinout looks like and you'll get five different answers — and here's the frustrating part: they might all be right. Unlike the Uno, where one board means one pin layout forever, "ESP32" is really an umbrella term for a chip that gets soldered onto dozens of different dev board designs, each breaking out a different subset of pins in a different arrangement.

That variety is exactly why so many people end up confused the first time they wire one up. You find a wiring diagram online, it doesn't quite match your board, and suddenly you're not sure if pin 12 is safe to use or if you're about to brick your board on the next power cycle (spoiler: some ESP32 pins really can do that).

Board naming adds another layer of confusion on top of that. Plenty of ESP32 dev boards are sold under names like NodeMCU-32S, which is unrelated to the original NodeMCU firmware project built for the ESP8266. Under the silkscreen, a NodeMCU-32S is a standard ESP32-WROOM-32 module on a breakout board, so the chip-level details in this guide apply to it directly (just check the pin labels printed on your board).

This guide focuses on the layout you'll see on the overwhelming majority of ESP32 dev boards in the wild — the 38-pin WROOM-32 devkit — and walks through what every functional group of pins actually does, including the handful that are genuinely dangerous to get wrong.

Using a newer chip? The S3, C3, C6 and H2 each have a different pin map, and some pins described here do not exist on them. Use the dedicated guides instead: ESP32-S3, ESP32-C3, ESP32-C6, ESP32-H2 and ESP32-CAM.

ESP32 DevKitC (38-pin) pinout diagram
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

Every header pin on the SolderHub Simulator ESP32 DevKitC: green is free GPIO, amber and orange need care (strapping, input-only, serial console), red is blocked (flash) or power, grey is ground.

ESP32 Pins at a Glance

If you needUseAvoid
Analog sensor with Wi-FiGPIO32, 33, 34, 35, 36, 39 (ADC1)ADC2 pins: 0, 2, 4, 12–15, 25–27
Button or switch13, 14, 16–19, 21–23, 25–27, 32, 3334–39 have no internal pull-up
LED, relay, buzzer16–19, 21–23, 25–27Strapping pins 0, 2, 5, 12, 15
I2CSDA 21, SCL 22Pins that clash with other buses
Never touchGPIO6–11Wired to the onboard flash

What's Actually on the Board

A DevKitC is a carrier for the ESP32-WROOM-32 module: the ESP32 chip (dual-core Xtensa LX6 up to 240 MHz, Wi-Fi and Bluetooth), 4 MB of flash and a PCB antenna under one shield. The carrier adds a 3.3 V regulator, a USB-to-UART bridge for uploads, and two buttons: EN resets the chip and BOOT holds GPIO0 low for flashing.

What's on an ESP32 DevKitC: antenna, WROOM-32 module, regulator, BOOT and EN buttons, USB-UART bridge, PWR LED and micro-USB, labelled on the SolderHub Simulator ESP32

Why the ESP32's Pinout Feels Chaotic (and Why It Isn't, Really)

The ESP32 is a dual-core Xtensa LX6 processor running up to 240 MHz, with built-in Wi-Fi and Bluetooth, and — depending on the exact module — anywhere from 30 to 38 physical pins broken out on the dev board. Underneath all that, the actual chip exposes around 34 GPIOs, but not all of them are safe to use freely, and that's the part tutorials often skip past.

Some pins are input-only. Some are wired internally to the board's onboard flash chip and are completely off-limits. A handful control the boot mode and can send your board into a boot loop if you get the wiring wrong at power-on. None of this is arbitrary — it's a side effect of squeezing Wi-Fi, Bluetooth, a dual-core CPU, and SPI flash onto one small chip — but it does mean the ESP32 rewards a bit of upfront pin-reading in a way the Uno never demanded.

Power Pins

PinDescription
VIN / 5VInput voltage, typically 5V via USB or the VIN pin depending on board
3V3Regulated 3.3V output — this is the board's actual logic level
GNDGround (multiple pins, all connected)
ENEnable pin — pull LOW to reset the chip

The single most important thing to internalize about the ESP32: every GPIO on this board runs at 3.3V logic, not 5V. This trips up a lot of people coming from the Arduino Uno, where 5V is the norm. Feed a 5V signal into an ESP32 GPIO pin — a 5V sensor output, a level from another 5V board — and you risk damaging the pin or the chip outright. If you're mixing an ESP32 with 5V peripherals, you need a logic level shifter on every signal line, no exceptions.

The EN pin is your hardware reset — pulling it LOW and releasing it restarts the chip, which is exactly what the onboard reset button is wired to do.

Power pins: 3V3, 5V, GND and EN
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

GPIO Pins — The General Case

Most GPIOs on the ESP32 can be configured as input or output, with internal pull-up or pull-down resistors available in software:

sketch.ino
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);

pinMode(4, INPUT_PULLUP);

That's the easy part. The hard part is knowing which of these "general purpose" pins actually have restrictions, so let's go through them.

Input-Only Pins (34, 35, 36, 39)

GPIOs 34, 35, 36 (often labeled VP), and 39 (often labeled VN) are input-only. They have no internal pull-up or pull-down resistors, and they cannot be configured as outputs under any circumstances — this is a hardware limitation, not a software restriction you can code your way around.

sketch.ino
pinMode(34, INPUT);  // fine
pinMode(34, OUTPUT); // will silently fail to behave as expected

These pins are great candidates for analog sensor inputs or simple digital reads where you don't need a pull-up, but if your circuit relies on an internal pull-up resistor (a lot of button and simple sensor wiring does), you'll need an external one on these four pins specifically.

Input-only pins (no pull-ups, no output)
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

Strapping Pins (0, 2, 5, 12, 15)

These pins are sampled by the ESP32 at the exact moment it boots, and their state determines things like which mode the chip boots into (normal flash boot vs. UART download mode), the flash voltage, and whether the ROM prints boot messages over the serial port. GPIO0 is the most notorious of these — it's the pin your dev board's "BOOT" button is wired to, and it's why holding BOOT while pressing reset puts the board into flashing mode.

The practical implication: if you're using these pins for your own circuit, make sure whatever you connect doesn't hold them in a state that interferes with boot at power-up. GPIO12 in particular has bitten a lot of people — if it's pulled HIGH at boot, it can select the wrong flash voltage and cause the board to fail to boot entirely. It's usually best to treat pins 0, 2, 5, 12, and 15 as "usable, but only after boot has completed," and avoid connecting anything to them that actively drives a strong signal during power-up.

One common mistake: many older guides list GPIO4 as a strapping pin. It is not. Espressif's datasheet names only GPIO0, 2, 5, 12 and 15, so GPIO4 is a normal pin once the board is running.

A few pins also change state briefly at power-up. On typical modules GPIO1 prints boot log text, GPIO3 sits HIGH, and GPIO5, 14, and 15 emit a short PWM-like pulse train. If one of these drives a relay, motor, or buzzer, expect a momentary glitch every time the board resets.

Strapping pins, sampled at boot
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

Pins That Are Simply Off-Limits (6, 7, 8, 9, 10, 11)

GPIOs 6 through 11 are wired internally to the SPI flash chip that stores your firmware. Many 38-pin devkits (DevKitC and NodeMCU-32S style boards) do break these out to the header, usually labeled SD0–SD3, CLK, and CMD, while some compact boards leave them off. Either way, do not use them for anything. Using these pins for your own circuit will interfere with the board reading its own program from flash, and at best your code won't run; at worst you'll need special tools to recover the board.

Flash pins GPIO6–11: never use
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

ESP32 GPIO safety map: every pin coloured as free, strapping, flash-reserved, input-only or serial console
Animated timeline: the five ESP32 strapping pins are sampled once at power-up, then become normal GPIOs

Analog Input (ADC)

The ESP32 has two separate ADC controllers, and knowing which one you're using matters more than it should.

ADCPinsWi-Fi Compatible?
ADC1GPIO32, 33, 34, 35, 36, 39Yes
ADC2GPIO0, 2, 4, 12, 13, 14, 15, 25, 26, 27No — conflicts with Wi-Fi driver
sketch.ino
int reading = analogRead(34);  // 0–4095, 12-bit resolution

This is the single most common ESP32 "gotcha" that catches people out mid-project: ADC2 pins stop working reliably the moment Wi-Fi is active, because the Wi-Fi driver takes priority over the ADC2 hardware internally. Your analog sensor works perfectly in testing, you add WiFi.begin(), and suddenly readings go flaky or return zero. If you need reliable analog input in a Wi-Fi-connected project, stick to ADC1 pins (32–39) and leave ADC2 for non-Wi-Fi builds or digital-only use.

The ADC itself gives 12-bit resolution (0–4095), a step up from the Uno's 10-bit (0–1023), though real-world linearity near the extremes of the voltage range is a known weak point — if you need precision at the very top or bottom of the range, expect to calibrate.

Attenuation matters too. With the default 11 dB setting the ADC reads accurately only from roughly 0.15V to 2.45V, and readings flatten out toward 3.3V. Never put more than 3.3V on any ADC pin, and use analogReadMilliVolts() to get calibrated millivolt readings instead of raw counts. For a full walkthrough of ADC1 versus ADC2, see the ESP32 ADC pins guide.

ADC1: the six analog pins that work with Wi-Fi on
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

A potentiometer on GPIO34 (ADC1), powered from 3V3. ADC1 keeps reading while Wi-Fi is on, and GPIO34 needs no pull-up (SolderHub Simulator parts)
sketch.ino
int raw = analogRead(34);              // 0–4095
int mv  = analogReadMilliVolts(34);    // calibrated millivolts

DAC — True Analog Output

Unlike the Uno, the original ESP32 can output a real analog voltage. It has two 8-bit DACs on GPIO25 (DAC1) and GPIO26 (DAC2), useful for audio, waveform generation, and feeding an analog input on another circuit. Newer variants such as the ESP32-S3 and C3 have no DAC.

sketch.ino
dacWrite(25, 128);  // ~1.65V on a 3.3V supply (128 / 255 × 3.3V)

The output runs from 0 to roughly 3.3V in 256 steps. Both DAC pins are also ADC2 pins, so avoid using them for analog input while Wi-Fi is on.

DAC pins GPIO25 and GPIO26
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

Animated chart: when Wi-Fi switches on, ADC2 pins become unreliable while ADC1 pins keep working

PWM — Not Fixed Pins, a Fixed Peripheral

This is where the ESP32 genuinely differs from the Uno and Mega in a way that surprises people coming from either board: there's no dedicated set of "PWM pins." Instead, the ESP32 has a peripheral called the LEDC (LED Control) driver, and you can assign a PWM channel to almost any GPIO in software.

sketch.ino
ledcAttach(2, 5000, 8);   // core 3.x: pin, frequency (Hz), resolution (bits)
ledcWrite(2, 128);        // ~50% duty at 8-bit resolution

Core version note: ledcAttach(pin, freq, resolution) is the Arduino-ESP32 core 3.x API. On core 2.x, use ledcSetup(channel, freq, resolution) followed by ledcAttachPin(pin, channel), and pass the channel number to ledcWrite(). For LED fading and motor-speed examples, see the ESP32 PWM (LEDC) tutorial.

There are 16 independent PWM channels available (organized across two timer groups), and you assign them to pins yourself rather than looking for a tilde on the silkscreen. This is more flexible than the Uno's fixed six PWM pins, but it also means you can't just glance at the board to know what's PWM-capable — nearly everything is, except the input-only and flash pins already covered above.

Pins that can output PWM (any output-capable GPIO except the flash pins)
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

Touch-Sensitive Pins

Ten GPIOs double as capacitive touch inputs, useful for touch buttons without any extra hardware:

Touch ChannelGPIO
T04
T10
T22
T315
T413
T512
T614
T727
T833
T932
sketch.ino
int touchValue = touchRead(T0);

Notice several of these overlap with the strapping pins covered earlier (0, 2, 12, 15) — one more reason to be deliberate about which "extra" pins you lean on for touch input versus which you reserve for safer, unrestricted GPIOs.

Capacitive touch pins T0–T9
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

I2C

The ESP32 has default I2C pins, but unlike the Uno they are fully reassignable in software to almost any GPIO:

PinFunction
GPIO21SDA (default)
GPIO22SCL (default)
sketch.ino
#include <Wire.h>
Wire.begin();               // uses default pins 21/22
Wire.begin(25, 26);           // or specify your own SDA/SCL pins

This flexibility is genuinely useful when your board layout or enclosure makes the default pins awkward to route, but it also means you need to double-check which pins a given library or example sketch expects — "the I2C pins" isn't a fixed physical fact on the ESP32 the way it is on the Uno. To put several devices on one bus, see ESP32 I2C pins and multiple devices.

Default I2C: SDA 21, SCL 22
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

Photo: an ESP32 devkit on a breadboard with a 4-pin I2C OLED display wired SDA to GPIO21, SCL to GPIO22, VCC to 3V3 and GND to GND

SPI

The ESP32 has two usable SPI buses in the Arduino framework, VSPI and HSPI, each with their own default pin set:

BusMOSIMISOSCKCS
VSPI2319185
HSPI13121415
sketch.ino
#include <SPI.h>
SPI.begin();  // defaults to VSPI on the classic ESP32

Like I2C, these pins can be remapped in software if needed, but the defaults above match what you'll find on almost every WROOM-32 devkit and VSPI is the safest starting point for a new project. Note that the HSPI defaults use GPIO12 (MISO) and GPIO15 (CS), both strapping pins: a peripheral that pulls GPIO12 HIGH at power-up can stop the board from booting, so prefer VSPI or remap HSPI to other pins. For wiring examples, see ESP32 SPI pins: MOSI, MISO, SCK and CS.

VSPI (23, 19, 18, 5) and HSPI (13, 12, 14, 15)
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

UART — Three Serial Ports This Time

Unlike the Uno's single UART, the ESP32 gives you three, though one of them is already spoken for.

PortTXRXTypical Use
UART0GPIO1GPIO3USB / Serial Monitor (programming)
UART1GPIO10GPIO9Rarely used — pins overlap with flash
UART2GPIO17GPIO16Free for your own peripheral
sketch.ino
Serial2.begin(9600, SERIAL_8N1, 16, 17);

UART2 is your practical second serial port for other microcontrollers, serial sensors, or Bluetooth modules — UART1's default pins overlap with the flash-connected GPIOs discussed earlier, so it's rarely usable without remapping to different pins first. For wiring and examples, see ESP32 UART pins and Serial2.

UART0 (1/3, USB) and UART2 (16/17)
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

RTC GPIOs and Deep Sleep Wake-Up

One of the ESP32's headline features is deep sleep, where the chip draws only microamps of current, and a specific subset of pins — the RTC GPIOs — can wake it back up:

sketch.ino
esp_sleep_enable_ext0_wakeup(GPIO_NUM_33, 1);  // wake on GPIO33 going HIGH
esp_deep_sleep_start();

The RTC-capable pins are GPIO0, 2, 4, 12–15, 25–27, and 32–39 — conveniently, this overlaps heavily with the ADC1 and ADC2 pin sets, since they all live on the same low-power RTC domain of the chip. If you're building a battery-powered sensor that wakes on a button press or a PIR trigger, this is the pin list to design around. Pins 34–39 can wake the chip too, but they have no internal pull resistors, so add an external pull-up or pull-down. For battery-life numbers and every wake-up source, see the ESP32 deep sleep guide.

RTC GPIOs that can wake the chip from deep sleep
3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Highlighted on the SolderHub Simulator ESP32-DevKitC V4. Explore every pin on the ESP32-DevKitC V4 board page.

deep sleep wake-up test with an ESP32 .
Flowchart: which ESP32 pin should I use for my sensor, button, relay or bus?

Practical Pin Usage Tips

Default to ADC1 for anything that needs to coexist with Wi-Fi. This single decision prevents the most common "my sensor stopped working after I added networking" bug in ESP32 projects.

Treat GPIO0, 2, 5, 12, and 15 with extra care during circuit design, not because they're unusable, but because whatever you attach to them needs to not interfere with the chip's boot sequence. A pull-down resistor on a relay module, for instance, can be enough to prevent GPIO12 from booting correctly if wired without thought.

Use a level shifter for any 5V peripheral, always. This isn't optional the way it sometimes is with the Uno's more tolerant digital pins — ESP32 GPIOs are not 5V tolerant, and this is the single fastest way people damage a brand-new board.

Respect the per-pin current limit. Espressif's absolute maximum is 40 mA per GPIO, so aim for 20 mA or less in practice. Drive LED strips, relays, motors, and buzzers through a transistor, MOSFET, or driver board rather than straight from a pin.

Pick your I2C and SPI pins deliberately and document them, since — unlike the Uno — there's no universal default that every example sketch assumes. Future you (or anyone reading your code) will thank you for a comment listing which physical pins map to which bus.

Don't assume your dev board breaks out every GPIO. Some compact ESP32 boards skip GPIO6–11 entirely (correctly, since they're reserved) but also omit a few of the input-only or strapping pins to simplify the header layout. Check your specific board's printed silkscreen or datasheet before assuming a pin from a generic ESP32 diagram is physically present.

A bidirectional logic level shifter module wired between the ESP32 (3.3 V side, LV) and a 5 V device (HV side), with the common GND connected
Interactive ESP32 pinout: tap any pin

38 of 38 pins match

3V3ENVP 36VN 39GPIO34GPIO35GPIO32GPIO33GPIO25GPIO26GPIO27GPIO14GPIO12GNDGPIO13D2 9D3 10CMD 115VGNDGPIO23GPIO22TX 1RX 3GPIO21GNDGPIO19GPIO18GPIO5GPIO17GPIO16GPIO4GPIO0GPIO2GPIO15D1 8D0 7CLK 6

Hover or tap any pin on the board

J2 header · pin 7

32

GPIO32

Safe to use

Nothing else on the board depends on this pin. A good first choice for sensors, LEDs and buttons.

Can be used as

  • PWM out
  • Analog in
  • Touch

Signals on this pad

  • GPIO32
  • ADC1_CH4
  • TOUCH_CH9
  • XTAL_32K_P
Tap or hover any pin for its functions and warnings.

Common Mistakes and How to Avoid Them

Wiring a 5V sensor straight into a GPIO. The most frequent way people damage an ESP32. Always shift 5V logic down to 3.3V first.

Expecting ADC2 to work once Wi-Fi is running. It won't, reliably. Move analog sensors to ADC1 pins before you add networking code, not after you've already debugged why the readings went strange.

Using GPIO6–11 because a diagram showed them as "available." These are internally wired to flash. If your board exposes them at all, leave them alone entirely.

Assuming a pull-up resistor exists on GPIO34–39. These four input-only pins have no internal pull-up or pull-down. If your circuit needs one, add it externally.

Powering the board's 3.3V rail with heavy external loads. The onboard regulator on most dev boards can supply a few hundred milliamps at most. Driving several servos or a bright LED strip off the 3V3 pin will brown out the chip — give hungry peripherals their own supply.


Summary: ESP32 Pin Reference at a Glance

FeatureDetail
Total GPIOs (typical devkit)~34, with several restricted
Input-only pins34, 35, 36, 39
Flash-reserved (avoid)6, 7, 8, 9, 10, 11
Strapping pins (boot-sensitive)0, 2, 5, 12, 15
ADC1 (Wi-Fi safe)32, 33, 34, 35, 36, 39
ADC2 (not Wi-Fi safe)0, 2, 4, 12–15, 25–27
PWMAny usable GPIO, via LEDC (16 channels)
Touch inputs10 channels (T0–T9)
DAC (8-bit)GPIO25, GPIO26
Default I2CSDA 21, SCL 22 (reassignable)
Default SPI (VSPI)MOSI 23, MISO 19, SCK 18, CS 5
UART3 ports — UART0 (USB), UART2 free by default
Logic level3.3V only — not 5V tolerant

The ESP32's pinout has a reputation for being confusing, but it's really just a chip with a lot of internal jobs — flash storage, boot mode selection, Wi-Fi, deep sleep wake logic — all sharing the same limited set of physical pins. Once you know which pins carry those extra responsibilities and which are genuinely free to use however you like, the board stops feeling like a minefield and starts feeling like what it actually is: one of the most capable, flexible microcontrollers you can buy for a few dollars.


ESP32 WROOM-32 · Dual-Core Xtensa LX6 · Wi-Fi + Bluetooth · ~34 GPIO · 2x ADC · 2x DAC · 3x UART · SPI · I2C · PWM (LEDC)

Test your pin plan first. The SolderHub Simulator has the same ESP32 DevKitC you see in these figures. Wire it up in the simulator before touching real hardware.

Quick Answers to Common ESP32 Pin Questions

How many usable GPIO pins does the ESP32 actually have? Around 34 physically exist on the chip, but factor in the 6 flash-reserved pins you should never touch and the 4 input-only pins with special handling, and you're realistically working with roughly 22–25 fully flexible general-purpose pins on a typical devkit.

Why does my sensor stop working when I connect to Wi-Fi? Almost certainly because it's wired to an ADC2 pin. ADC2 shares hardware with the Wi-Fi radio and becomes unreliable the moment Wi-Fi is active. Move the sensor to an ADC1 pin (32, 33, 34, 35, 36, or 39).

Which pins are safe to use without reading a datasheet first? As a rough rule of thumb: GPIO16–19, 21–23, and 25–27 are generally safe, flexible, general-purpose choices on most WROOM-32 devkits, with none of the boot-sensitivity or flash-reservation issues of the other groups. One exception: on WROVER and other PSRAM modules, GPIO16 and 17 are used internally by the PSRAM, so leave them alone there.

Which ESP32 pins have a DAC? GPIO25 and GPIO26 on the original ESP32, both 8-bit. Use dacWrite(pin, value) with a value from 0 to 255.

How much current can an ESP32 GPIO supply? Espressif's absolute maximum is 40 mA per pin, but plan for 20 mA or less, and use a transistor or MOSFET for anything heavier than a small LED.

Can I use 5V sensors with the ESP32? Only through a logic level shifter. The ESP32 is a 3.3V device throughout, and its GPIOs are not rated to tolerate 5V signals the way some other 3.3V boards' pins are.

What's the difference between GPIO34 and a regular GPIO like GPIO4? GPIO34 (and 35, 36, 39) are input-only at the hardware level — they physically cannot drive an output signal and have no internal pull-up/pull-down circuitry, whereas GPIO4 can be freely configured as input or output with internal pull resistors available.

Do all ESP32 boards have the same pinout? No — this is the biggest source of confusion with this chip. The underlying silicon is consistent, but different board manufacturers break out different pin subsets, use different silkscreen labels, and sometimes wire onboard peripherals (like an OLED display or camera) directly onto GPIOs that would otherwise be free. Always check your specific board's diagram, treating this guide as the reference for the chip's capabilities rather than a guaranteed match to every board's silkscreen.


Where to Go From Here

Once the restricted pins and dual-ADC quirks stop being a surprise, the ESP32 turns into one of the most flexible boards available at its price point — a genuinely different category of project becomes possible compared to an Uno or even a Mega, purely because of the built-in networking. The natural next step from here is usually wiring up a first Wi-Fi-connected sensor project, at which point the ADC1-vs-ADC2 distinction covered above stops being trivia and starts being the thing that determines whether your project works on the first try or sends you searching forums for why your readings went to zero the moment you called WiFi.begin().

Next guides: ESP32 GPIO input and output · Connect the ESP32 to Wi-Fi · ESP32 PWM (LEDC) · ESP32 deep sleep

Continue learning

Related articles

All articles

Signal In

Built from what makers search for

The lookups piling up in SolderHub's search bar every day shape what we publish next — new component pages, board guides, and firmware notes, sent out as they go live.

By subscribing you agree to our Privacy Policy. Unsubscribe anytime.