ESP32 development board and wiring being checked for safe GPIO pin selection

Free ESP32 GPIO tool

ESP32 Pin Checker: safe GPIO pins, boot pins, and pins to avoid.

Pick your ESP32 board family, GPIO number, and use case. The checker tells you whether the pin is safe, risky, or should be avoided before you wire a relay, sensor, OLED, servo, UART, or PCB.

Direct answer

Which ESP32 pins are usually safe?

For many classic ESP32 DevKit and WROOM boards, GPIO16, GPIO17, GPIO18, GPIO19, GPIO21, GPIO22, GPIO23, GPIO25, GPIO26, GPIO27, GPIO32, and GPIO33 are usually safer general-purpose choices. Avoid GPIO6-GPIO11. Treat GPIO0, GPIO2, GPIO4, GPIO5, GPIO12, and GPIO15 as boot-sensitive. GPIO34, GPIO35, GPIO36, and GPIO39 are input-only.

Best default I2C GPIO21 SDA, GPIO22 SCL

Good starting point for OLED, LCD backpacks, BME280, MPU6050, and other common I2C modules.

Good outputs 16, 17, 18, 19, 23, 25, 26, 27, 32, 33

Often good for LEDs, relays, enable pins, chip selects, and general control signals.

Avoid on classic ESP32 GPIO6 to GPIO11

These are commonly connected to SPI flash and can break boot, program upload, or normal execution.

Input only GPIO34, 35, 36, 39

Useful for ADC readings and buttons, but they cannot drive a relay, LED, PWM, or I2C signal.

Interactive checker

Check your exact GPIO use case.

Choose the board family, the pin, and what you want to connect. Use this as a fast sanity check before soldering, ordering a PCB, or debugging a board that refuses to boot.

Pin reference

ESP32 GPIO groups explained.

Most ESP32 wiring mistakes happen because a pin works in one sketch but fails during upload, boot, WiFi startup, or when a relay or display is attached. Use this table before connecting external circuits.

GPIO group Typical status Good for Watch out for
GPIO16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33 Usually safe on classic ESP32 boards I2C, SPI, relay trigger, LEDs, buttons, PWM, chip select, enable pins Board-specific reservations, external pullups, boot-time loads, and module shields
GPIO0, 2, 4, 5, 12, 15 Boot-sensitive Can be used carefully after boot Wrong pullup or pulldown at reset can cause upload failure or boot failure
GPIO34, 35, 36, 39 Input-only Analog readings, switches, sensor outputs No output drive, no relay trigger, no PWM, no I2C clock/data
GPIO6, 7, 8, 9, 10, 11 Avoid on most classic ESP32 modules Normally none for project wiring Usually connected to flash memory; using them can crash or stop the board
GPIO1 and GPIO3 UART pins Serial monitor, programming, UART devices if planned carefully External devices can block upload logs or programming
ESP32-CAM GPIOs Highly shared Limited extra IO after camera and SD card choices Camera, microSD, flash LED, boot mode, and UART already consume many useful pins

Use-case guide

Best ESP32 pins by project type.

ESP32 relay module pins

Prefer a normal output pin such as GPIO16, GPIO17, GPIO18, GPIO19, GPIO23, GPIO25, GPIO26, GPIO27, GPIO32, or GPIO33. Avoid input-only pins and be careful with boot pins if the relay board pulls the input high or low during reset.

Fix ESP32 relay problems
ESP32 I2C OLED or sensor pins

Start with GPIO21 as SDA and GPIO22 as SCL on many DevKit boards. If you change pins, make sure your code uses Wire.begin(SDA, SCL) and run an I2C scanner before blaming the display or sensor.

Open I2C scanner
ESP32 PWM and servo pins

Use normal output-capable pins and power the servo separately with a common ground. Do not use input-only pins. Avoid pins that affect boot if the attached circuit has strong pullups or pulldowns.

Fix servo jitter
ESP32 analog input pins

GPIO32, GPIO33, GPIO34, GPIO35, GPIO36, and GPIO39 are common analog input choices on classic ESP32. Remember that ADC behavior can vary with WiFi and board design, so test with your real sensor range.

Score project reliability
ESP32 UART pins

GPIO1 and GPIO3 are commonly tied to USB serial. For external GPS, GSM, RS485, or another UART device, consider alternate UART-capable pins so programming and serial logs remain usable.

Fix UART AT response
ESP32-CAM extra GPIO pins

On ESP32-CAM, treat every extra pin as shared until confirmed. Camera, SD card, flash LED, and programming mode all compete for IO. Test with camera streaming enabled before using a pin in a final design.

Fix ESP32-CAM

Debug path

If the ESP32 stopped booting after wiring a module.

Step 1 Disconnect the external module

If the board boots again, the module is likely loading a boot pin, drawing too much current, or disturbing EN/reset.

Step 2 Move the signal to a safer GPIO

Try a normal output-capable pin such as GPIO16, GPIO17, GPIO18, GPIO19, GPIO23, GPIO25, GPIO26, GPIO27, GPIO32, or GPIO33.

Step 3 Check power before code

Relays, servos, SIM800L modules, WiFi bursts, and camera boards can brown out the ESP32 even when the pin choice is correct.

FAQ

ESP32 pin questions

Can I use GPIO34 for a relay?

No. GPIO34 is input-only. It cannot drive a relay, LED, PWM signal, or I2C line.

Why does ESP32 fail to boot after connecting a module?

The module may be pulling a boot strapping pin to the wrong level during reset. Check GPIO0, GPIO2, GPIO4, GPIO5, GPIO12, and GPIO15 first.

Are GPIO21 and GPIO22 required for I2C?

No. ESP32 can use many pins for I2C in code, but GPIO21 as SDA and GPIO22 as SCL are common defaults on many development boards.

Can I use ESP32 boot pins after startup?

Sometimes, yes. But the attached circuit must not force the wrong logic level during reset. For beginner projects and first PCBs, safer non-boot pins are usually better.

Which ESP32 pins should not be used for project wiring?

On common classic ESP32 modules, avoid GPIO6, GPIO7, GPIO8, GPIO9, GPIO10, and GPIO11 because they are usually connected to flash memory.

Before you order the PCB

Run the rest of the project through PCBVault.

Pin choice is only one failure point. Check your power supply, wiring, modules, firmware, and PCB-readiness before moving from breadboard to a manufactured board.

Free Electronics Project Rescue Pack Get the checklist for debugging ESP32, Arduino, sensors, relays, power, and first PCB mistakes. Get the free pack