ESP32 Pinout Guide: Which Pins Are Safe to Use

ESP32 Pinout Guide: Which Pins Are Safe to Use

  • Safest for a first project: GPIO4, 13, 14, 16-19, 21-23, 27, 32 and 33.
  • Strapping pins: avoid GPIO0, 2, 5, 12 and 15 for anything held at power-up.
  • Input-only: GPIO34, 35, 36 and 39.
  • Never use: GPIO6-11 (flash).
  • Analog with Wi-Fi on: use ADC1 pins (GPIO32-39).
  • Defaults: I2C is SDA 21 / SCL 22; SPI is SCK 18, MISO 19, MOSI 23.

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 chip itself has 48 pins; the DevKitC board breaks most of them out to its two pin headers (38 on the standard DevKitC V4, so count yours). 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.

ESP32-DEVKITC full pinout — GPIO capabilities (verified pin map, August 2026)
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 plain words, and it will generate a verified wiring plan using the right pins for your exact parts.

FAQ

Which ESP32 pins are input-only?

GPIO34, 35, 36 and 39. They have no output driver, so they cannot drive an LED, relay or PWM.

Why do my analog readings fail with Wi-Fi on?

ADC2 shares hardware with Wi-Fi. Use an ADC1 pin (GPIO32-39) for analog reads in Wi-Fi projects.

Which pins can do PWM?

Almost any output-capable GPIO. The ESP32's LEDC PWM can be routed in software. The exception is the input-only pins.

Which pins give a true analog output?

GPIO25 and GPIO26, the two DAC pins. Every other pin can only fake analog with PWM.

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.

Back to blog

Open this project in the Soldr app → What is Soldr.ai → parts, wiring and code for what this guide builds