Skip to content
Guide
12 min read
October 17, 2026

Raspberry Pi Zero Pinout: GPIO, Power, and Zero-Specific Ports Explained

Complete Raspberry Pi Zero pinout reference: a full pin-by-pin 40-pin GPIO table, physical vs BCM numbering, I2C/SPI/UART, and the Zero-specific port quirks (mini-HDMI, micro-USB OTG, camera cable).

The Raspberry Pi Zero is proof that "full Linux computer" and "fits inside an Altoids tin" aren't mutually exclusive. It runs the exact same 40-pin GPIO layout as a full-size Raspberry Pi 3 or 4, which means the same HATs, the same wiring diagrams, and the same RPi.GPIO/gpiozero code — just shrunk onto a board the size of a stick of gum.

The catch is that shrinking the board didn't shrink the number of things you need to know before wiring it up. The header usually ships unpopulated, the ports are miniaturized in ways that need adapter cables, and there are a couple of Zero-specific quirks (the status LED lives on a different GPIO than you'd expect, for one) that don't show up on a full-size Pi.

Here's the complete pin and hardware breakdown — GPIO, power, and the physical-port gotchas that are specific to the Zero form factor.

Full Raspberry Pi Zero pinout — 40-pin GPIO header, power, and Zero-specific ports

What's Actually on the Board

Every Raspberry Pi Zero variant — the original Zero, Zero W, and Zero 2 W — uses the same 40-pin GPIO header layout as the full-size Raspberry Pi 3 and 4. If you've wired anything for a regular Pi, the pin map transfers directly. What changes between Zero variants is the compute side: the original Zero uses a single-core BCM2835 at 1GHz, the Zero W adds 2.4GHz Wi-Fi and Bluetooth on the same chip, and the Zero 2 W jumps to a quad-core BCM2710A1 (the same silicon family as the Pi 3) at 1GHz with 512MB of RAM — a genuine performance leap in the same footprint.

The header itself provides 26 usable GPIO pins, plus power and ground. Most Zero boards ship with this header completely unpopulated — you'll need to solder a 2×20 pin header (or use solderless pogo-pin adapters) before you can wire anything to it at all. This trips up more first-time Zero buyers than any pin-mapping question does.


The 40-Pin Header

CategoryCountDetail
GPIO (usable)26General-purpose, BCM-numbered
5V2Direct from the board's 5V input
3.3V2Regulated output
GND8Ground
ID EEPROM (SDA/SCL)2Reserved for HAT identification — pins 27 & 28

Two numbering systems matter here, and mixing them up is the single most common Pi GPIO mistake:

  • Physical/BOARD numbering — the simple 1-to-40 count of the pin's physical position on the header.
  • BCM numbering — the actual GPIO channel on the Broadcom SoC (e.g., "GPIO17"), which is what RPi.GPIO and gpiozero actually expect in code.

Physical pin 11, for example, is BCM/GPIO 17 — not GPIO 11. Getting this backwards is the top cause of "my code runs but nothing happens" confusion for anyone new to the platform.

from gpiozero import LED
led = LED(17)  # this is BCM/GPIO numbering, NOT physical pin 17
led.on()

Pins 27 and 28 are reserved for the HAT ID EEPROM (used for auto-detecting HAT add-on boards) and appear in software as GPIO0 and GPIO1 — leave them alone unless you're specifically designing a HAT.

The Full 40-Pin Reference, Pin by Pin

This is the table worth bookmarking — every physical pin, in header order, with its BCM GPIO number where one applies:

Physical PinFunctionPhysical PinFunction
13.3V Power25V Power
3GPIO2 (SDA1 / I2C)45V Power
5GPIO3 (SCL1 / I2C)6GND
7GPIO4 (GPCLK0)8GPIO14 (TXD, UART)
9GND10GPIO15 (RXD, UART)
11GPIO1712GPIO18 (PCM_CLK / PWM0)
13GPIO2714GND
15GPIO2216GPIO23
173.3V Power18GPIO24
19GPIO10 (SPI0 MOSI)20GND
21GPIO9 (SPI0 MISO)22GPIO25
23GPIO11 (SPI0 SCLK)24GPIO8 (SPI0 CE0)
25GND26GPIO7 (SPI0 CE1)
27ID_SD (HAT EEPROM)28ID_SC (HAT EEPROM)
29GPIO530GND
31GPIO632GPIO12 (PWM0)
33GPIO13 (PWM1)34GND
35GPIO19 (PCM_FS / PWM1)36GPIO16
37GPIO2638GPIO20
39GND40GPIO21

Finding pin 1 on the board: pin 1 is the one closest to the micro-SD card slot, usually marked with a square solder pad on the underside of the PCB (every other pin uses a round pad) — that square pad is the fastest way to orient the header correctly before wiring anything, HAT or otherwise.


Power Pins

PinDescription
5VDirect board input voltage — no onboard regulation between this and the micro-USB power port
3.3VRegulated output for GPIO-level peripherals
GNDGround (8 pins, all common)

The Zero has no barrel jack and no full-size USB power connector — it's powered exclusively through its micro-USB port (or, less commonly, directly via the 5V/GND header pins, which bypasses the board's polyfuse and reverse-polarity protection and should be reserved for advanced, space-constrained builds). Because of the board's small size and limited power circuitry, a genuinely stable 5V supply matters more here than on a full-size Pi — flaky USB cables and underpowered hubs are a disproportionately common cause of random reboots and SD card corruption on Zero-based projects.


GPIO Pins — Digital I/O

All 26 GPIO pins operate at 3.3V logic, and — critically — are not 5V tolerant. Feeding a 5V signal from a sensor or module directly into a GPIO pin can damage it permanently; use a logic-level shifter for any 5V peripheral.

from gpiozero import Button
button = Button(2)  # BCM GPIO 2

Each GPIO pin can source or sink only a few tens of mA, and the combined draw across all GPIO pins is capped too — driving several LEDs, a relay, or a motor straight off the header, with no current-limiting resistor or driver circuit in between, is one of the fastest ways to cause brownouts or permanent damage on a board this small.


Communication Pins

I2C, SPI, and UART

InterfacePins (BCM)
I2C (SDA / SCL)GPIO2 / GPIO3
SPI0 (MOSI / MISO / SCLK / CE0 / CE1)GPIO10 / GPIO9 / GPIO11 / GPIO8 / GPIO7
UART (TX / RX)GPIO14 / GPIO15
# I2C example
import smbus2
bus = smbus2.SMBus(1)

The Zero exposes the same primary UART, SPI0, and I2C1 bus that a full-size Pi does, and the same raspi-config steps (enabling I2C, SPI, or serial under Interface Options) apply identically. On Zero W and Zero 2 W boards, the secondary UART is internally connected to the Bluetooth radio by default rather than being exposed on the header — if a project needs two independent hardware UARTs, that's a real constraint worth planning around early, since only one (GPIO14/15) is available externally.


PWM

Hardware PWM is available on a subset of GPIO pins (commonly GPIO12, 13, 18, and 19), useful for dimming LEDs, driving servos, or generating precise timing signals without relying on software-timed bit-banging, which is more CPU-intensive and less precise.

from gpiozero import PWMLED
led = PWMLED(18)
led.value = 0.5  # 50% brightness

Onboard LEDs

LEDFunction
PWR (red)Power indicator — hardwired, not user-controllable
ACT (green)SD card activity by default, but user-programmable via a device-tree overlay

The ACT LED can be repointed to do something else entirely (a heartbeat blink, a Wi-Fi status indicator, whatever your project needs) by editing /boot/config.txt and setting a GPIO trigger — a small but genuinely useful customization that surprises people who assume it's hardwired like the PWR LED is.


Zero-Specific Ports (Not on the GPIO Header, But Worth Knowing)

Mini-HDMI, not full-size HDMI — you'll need a mini-to-standard HDMI adapter or cable for any display.

Micro-USB OTG port for peripherals — this is a data port, not a power port, and connecting a keyboard, mouse, or USB hub requires a USB OTG adapter. It's easy to plug a USB device into the wrong micro-USB port, since the board has two nearly identical ones (power vs. data), distinguished only by small silkscreen labels.

CSI camera connector, but it uses a smaller connector pitch than a full-size Pi's camera port — a Zero-specific ribbon cable (not the standard Pi camera cable) is required to connect a Camera Module.

No wired Ethernet on any Zero variant — Zero W and Zero 2 W add Wi-Fi; the original Zero has no networking at all beyond USB-tethered options.

Test pads on the board's underside expose a hardware RUN/reset pad and, on some revisions, composite TV-out — useful for advanced projects, but not silkscreened as clearly as the main header.


Practical Pin Usage Tips

Solder the header before you do anything else. It's the single most common "my Zero doesn't work" support question, and it isn't a software problem.

Always use BCM numbering in code, physical numbering when reading a wiring diagram. Keep both in front of you until it becomes automatic.

Budget for a genuinely stable 5V supply. The Zero's compact power circuitry is less forgiving of marginal USB cables and hubs than a full-size Pi's is.

Plan around a single external UART. If a project needs two independent hardware serial connections, the Bluetooth-shared secondary UART on Zero W/2 W won't give you a second free one without extra configuration.

Use a logic-level shifter for any 5V sensor. GPIO pins are 3.3V-only and not 5V tolerant, identical to every other modern Raspberry Pi.


Common Mistakes and How to Avoid Them

Buying a Zero board without checking header status. Most ship without a soldered header — factor that into your first order if you don't have a soldering iron handy.

Confusing the two micro-USB ports. One is power-only, the other is USB OTG data — check the silkscreen labels (often "PWR" and "USB") before connecting anything.

Using a standard Pi camera ribbon cable. The Zero's CSI connector pitch is different and needs its own Zero-specific cable.

Wiring a 5V signal directly into a GPIO pin. Same rule as every modern Pi — 3.3V logic only, use a level shifter for anything higher.

Assuming the ACT LED can't be changed. It can, via a device-tree overlay in /boot/config.txt — useful for custom status indicators.


Summary: Raspberry Pi Zero Pin Reference at a Glance

FeatureCount / Detail
Total header pins40
Usable GPIO26
I2C1 (GPIO2/GPIO3)
SPISPI0 (GPIO7–11)
Hardware UART (external)1 (GPIO14/GPIO15)
PWM-capable pins4 common (GPIO12, 13, 18, 19)
Logic level3.3V, not 5V tolerant
Power inputMicro-USB only (or 5V/GND header, unregulated path)
Camera connectorCSI, Zero-specific ribbon cable required
Display outputMini-HDMI
Wireless (W / 2 W only)2.4GHz Wi-Fi, Bluetooth

The Zero's real trick is that it doesn't ask you to learn a new pinout at all — it's the same GPIO map as every other modern Raspberry Pi, just wearing a much smaller jacket. Solder the header, sort out the port adapters, and everything you already know about Pi GPIO wiring, gpiozero, and HAT compatibility carries straight over unchanged.


Raspberry Pi Zero Family · 40-Pin GPIO Header · 26 Usable GPIO · I2C · SPI · UART · PWM

Quick Answers to Common Pi Zero Pin Questions

Does the Zero use the same GPIO layout as a full-size Pi? Yes — identical 40-pin header and pin functions to the Pi 3 and Pi 4, so existing wiring diagrams and HATs work the same way.

Why doesn't my Zero have header pins? Most ship with the header completely unpopulated. You'll need to solder a 2×20 header (or use a solderless adapter) before wiring anything.

Are GPIO pins 5V tolerant? No — 3.3V logic only, same as every modern Raspberry Pi. Use a logic-level shifter for 5V sensors and modules.

What's the difference between physical and BCM pin numbering? Physical numbering is the simple 1–40 position on the header; BCM numbering is the GPIO channel number the SoC actually uses, which is what RPi.GPIO and gpiozero expect in code. They're not the same number for most pins.

Can I use two hardware UARTs? Only one is exposed on the header (GPIO14/15). On Zero W and Zero 2 W, the second UART is internally wired to the Bluetooth radio by default, not available externally without extra configuration.

Which micro-USB port do I plug a keyboard into? The one labeled for USB/data, using an OTG adapter — the other micro-USB port is power-only and won't recognize connected devices.

Does the Zero's camera port take a standard Pi camera cable? No — its CSI connector uses a different pitch and needs a Zero-specific ribbon cable.

What's the difference between the Zero, Zero W, and Zero 2 W? The original Zero has no wireless and a single-core BCM2835. The Zero W adds Wi-Fi/Bluetooth on the same chip. The Zero 2 W jumps to a quad-core BCM2710A1 (Pi 3-class performance) with the same wireless capability, in the identical physical footprint.


Where to Go From Here

Once the header's soldered and the port adapters are sorted, the GPIO side of the Zero behaves exactly like a full-size Pi — so the natural next step is the same as for any Raspberry Pi: enabling I2C/SPI/UART in raspi-config, working through gpiozero examples, and exploring HAT compatibility. The main thing worth revisiting specifically for the Zero is power supply quality, since its compact design is noticeably less forgiving of marginal USB cables than a full-size Pi.

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.