ESP32 Pinout Guide: Which Pins Are Safe to Use
Share
ESP32 Pinout Guide: Which Pins Are Safe to Use
Quick answer: Most of the ESP32-DEVKITC's 26 usable GPIO pins are safe for general use. Avoid GPIO0, 2, 5, 12, and 15 for anything needing a fixed state at power-up — they set the boot mode. GPIO34, 35, 36, and 39 are input-only. GPIO6-11 connect to the onboard flash chip — never use them.
Written and fact-checked by Compoden's engineering team, India. Pin data below is checked live against our catalogue's own verified pin map, not a generic ESP32 pinout diagram. Published 18 August 2026 · Last updated 18 August 2026.
The ESP32-DEVKITC exposes 48 physical pins, but not all of them are ordinary GPIO you can wire to any sensor or LED — some are input-only, some carry hidden boot-mode responsibilities, and a few should never be touched at all. Getting this wrong doesn't always throw an error; sometimes the board simply refuses to boot, or a sensor read comes back wrong for no obvious reason. This guide covers the 26 GPIO pins actually usable on our ESP32-DEVKITC board, pulled from our own verified pin map, not a generic diagram that may not match your exact board.
| Pin | Capabilities | Caution |
|---|---|---|
| GPIO0 | Digital, ADC2, touch, output | Strapping/boot pin — avoid external pull at power-up |
| GPIO1 (TX0) | UART0 TX | Used by Serial Monitor/programming — avoid during upload |
| GPIO2 | Digital, ADC2, touch, output | Strapping/boot pin; onboard LED on some boards |
| GPIO3 (RX0) | UART0 RX | Used by Serial Monitor/programming — avoid during upload |
| GPIO4 | Digital, ADC2, touch, PWM, output | Generally safe |
| GPIO5 | Digital, PWM, SPI CS (VSPI), output | Strapping/boot pin — avoid external pull at power-up |
| GPIO12 | Digital, ADC2, touch, output | Strapping pin — pulling HIGH at boot can select the wrong flash voltage |
| GPIO13 | Digital, ADC2, touch, PWM, output | Generally safe |
| GPIO14 | Digital, ADC2, touch, PWM, output | Generally safe |
| GPIO15 | Digital, ADC2, touch, output | Strapping pin — affects boot log verbosity |
| GPIO16/17 | Digital, PWM, output | Generally safe (used for PSRAM on some ESP32 variants — not this one) |
| GPIO18/19 | Digital, PWM, SPI SCK/MISO (VSPI), output | Generally safe |
| GPIO21/22 | Digital, PWM, I2C SDA/SCL, output | Default I2C bus — reserve if using I2C sensors |
| GPIO23 | Digital, PWM, SPI MOSI (VSPI), output | Generally safe |
| GPIO25/26 | Digital, ADC2, DAC1/DAC2, PWM, output | The only two true analog OUTPUT pins |
| GPIO27 | Digital, ADC2, touch, PWM, output | Generally safe |
| GPIO32/33 | Digital, ADC1, touch, PWM, output | Safe for analog reads even with WiFi active |
| GPIO34/35 | Digital, ADC1 | INPUT-ONLY — cannot drive an output at all |
| GPIO36/39 | Digital, ADC1 (sensor VP/VN) | INPUT-ONLY — cannot drive an output at all |
Verdict in one line: for a first project, prefer GPIO4, 13, 14, 16-19, 21-23, 27, or 32/33 — they carry the fewest caveats and are the pins nearly every Soldr-generated ESP32 sketch reaches for first.
What actually goes wrong if you use a strapping pin the wrong way?
The ESP32 reads GPIO0, 2, 5, 12, and 15 at the exact moment it powers on or resets, to decide things like which mode to boot into and how loud to make its boot log. If something in your circuit — a pull-up resistor, an LED, a sensor holding the line — forces one of these pins to the "wrong" state at that exact instant, the board can boot into the wrong mode or fail to boot at all, and the symptom often looks like "my code isn't running" rather than anything obviously pin-related. The practical fix is simple: for a first project, avoid wiring anything to these five pins unless you specifically need to, and if you must use one, wire it so nothing holds it in a fixed state during the brief moment the board powers up.
Why can't GPIO34, 35, 36, and 39 drive an LED or a relay?
Because they are physically input-only on this chip — there's no output driver circuitry behind them at all, so no code, library, or `pinMode()` call can make them output anything. This isn't a software restriction to work around; it's a hardware fact set at the silicon level. They're genuinely useful for analog sensor reads (all four are ADC1-capable) precisely because a pure input pin has no output stage to interfere with a clean analog reading — just don't plan to wire an LED, relay, or any driven signal to them.
What's the real difference between ADC1 and ADC2 pins, and why does it matter?
ADC1 pins (GPIO32-39) and ADC2 pins (most of GPIO0-27's analog-capable pins) are two separate analog-to-digital converter peripherals inside the chip, and the ESP32's WiFi radio shares hardware with ADC2. In practice, this means ADC2 pins can return unreliable or unavailable readings whenever WiFi is actively connected — a well-documented Espressif hardware limitation, not a bug in your code. For any project that needs both WiFi and a reliable analog reading (a WiFi-connected soil moisture sensor, for example), use an ADC1 pin (GPIO32-39) for the sensor and save ADC2 pins for digital-only jobs.
Which pins should you use for I2C and SPI sensors by default?
Unless a specific sensor or library forces different pins, GPIO21 (SDA) and GPIO22 (SCL) are the ESP32-DEVKITC's default I2C bus — most I2C libraries assume these without being told, so wiring a sensor here first avoids extra configuration. For SPI, GPIO18 (SCK), GPIO19 (MISO), and GPIO23 (MOSI) are the default VSPI bus, with any other free GPIO usable as the chip-select (CS) line. Sticking to these defaults isn't mandatory — the ESP32 can reassign most peripherals to other pins in software — but it's the path with the fewest surprises for a first build.
What should you know about GPIO25 and GPIO26 specifically?
They're the ESP32's only two genuine analog OUTPUT pins (DAC1 and DAC2) — able to produce a real, smoothly varying analog voltage, not just a PWM-simulated one. Most projects never need this (PWM covers dimming an LED or speed-controlling a motor just fine), but anything generating an actual analog waveform — a simple audio output, a voltage reference for another circuit — needs one of these two specific pins, since no other GPIO on the chip can do it.
Which ESP32 board should you actually buy?
For general-purpose projects, the standard ESP32-DEVKITC Development Board (Rs.340) — the board this whole pinout guide is measured from — covers nearly every hobbyist build. If your project is genuinely tight on board space, an ESP32-C3 Super Mini (Rs.290) trades some GPIO count for a dramatically smaller footprint — useful for wearables or anything going inside a small enclosure, but check its own pinout separately since a smaller chip means fewer, differently-numbered pins.
What should you read next?
New to GPIO as a concept? Our What Is GPIO? guide covers the fundamentals this pinout builds on. Deciding between the ESP32 and other boards first? Our ESP32 vs Arduino Uno comparison covers that earlier decision.
Not sure which pins your specific project needs? Open Soldr, describe your build in one sentence, and it will generate a verified wiring plan using the right pins for your exact parts.
Frequently asked questions
ESP32 mein kaunse pins safe hain use karne ke liye?
GPIO4, 13, 14, 16-19, 21-23, 27, aur 32/33 - inme sabse kam caution hai aur inhe first project ke liye recommend kiya jaata hai. GPIO0, 2, 5, 12, 15 (strapping pins) aur GPIO34, 35, 36, 39 (input-only) ko dhyaan se use karo - inke apne rules hain jo upar table mein diye gaye hain.
What happens if I accidentally use a strapping pin in my project?
Most of the time, nothing goes wrong — strapping pins only matter at the exact instant of power-up or reset. The risk is specifically when something in your circuit (a pull-up/pull-down resistor, an always-on LED, a sensor holding the line) forces the pin to a fixed state right at that moment, which can make the board boot into the wrong mode or fail to boot. If your project boots and runs fine, a strapping pin used mid-program is not causing an active problem.
How many usable GPIO pins does the ESP32-DEVKITC actually have?
26 GPIO pins are usable for general project wiring on our ESP32-DEVKITC board, out of 48 total physical pins (the rest are power, ground, and pins reserved for the onboard flash chip that should never be touched). Of those 26, 4 are input-only (GPIO34, 35, 36, 39) and 5 carry boot-mode caveats (GPIO0, 2, 5, 12, 15) — the remaining 17 are the safest general-purpose choices. Price checked August 2026: Rs.340 at Compoden, cash on delivery available.
Can I use any GPIO pin for PWM (dimming an LED or controlling a servo)?
Nearly all of them — the ESP32's PWM (LEDC peripheral) can be routed in software to almost any GPIO pin, unlike some older microcontrollers with PWM hardwired to specific pins only. The main exceptions are the four input-only pins (GPIO34, 35, 36, 39), which cannot output PWM for the same reason they can't output anything else — there's no output driver circuitry behind them at all.