The Raspberry Pi 5 keeps the familiar 40-pin GPIO header found on every full-size Pi since the Model B+, so if you've wired up a Pi 4 project before, the physical pin layout for power, ground, and GPIO numbering is unchanged. What is new is how those signals get processed — Raspberry Pi 5 introduces a custom RP1 I/O controller chip that now handles GPIO, PCIe, camera/display, and USB routing instead of the main Broadcom SoC doing it directly, according to Raspberry Pi's own official documentation.
Raspberry Pi 5 Pinout Guide: The Full 40-Pin GPIO Breakdown
Every GPIO pin, power rail, and new connector on the Raspberry Pi 5 board, explained with sourced specs

This guide breaks down every pin on the header, the voltage and current limits you need to respect, and the new non-GPIO connectors (PCIe, fan, RTC battery, power button) that ship alongside the classic 40-pin block. For the full spec sheet beyond the pinout, see the Raspberry Pi 5 specs breakdown.
Raspberry Pi 5 Pinout at a Glance
The 40-pin header carries four signal types: fixed power rails (3.3V and 5V), ground, and general-purpose I/O (GPIO) pins that can be reassigned to specialized functions like I2C, SPI, UART, and PWM.
| Rail | Pin count | Notes |
|---|---|---|
| 3.3V power | 2 (pins 1, 17) | Logic-level supply for most HATs |
| 5V power | 2 (pins 2, 4) | Drawn from the board's main power input |
| Ground (GND) | 8 | Distributed across the header for clean returns |
| GPIO (programmable) | 26 | Includes dedicated I2C, SPI, UART, and PWM-capable pins |
| ID EEPROM pins | 2 (pins 27, 28) | Reserved for HAT auto-detection, not general GPIO |
Source: Raspberry Pi official documentation.
The 40-Pin GPIO Header: What Every Pin Does
The table below lists the standard Raspberry Pi 40-pin layout, which the Pi 5 retains pin-for-pin per official documentation. Odd-numbered pins run down the left column, even-numbered pins down the right.
| Pin | Function | Pin | Function |
|---|---|---|---|
| 1 | 3.3V power | 2 | 5V power |
| 3 | GPIO2 (I2C1 SDA) | 4 | 5V power |
| 5 | GPIO3 (I2C1 SCL) | 6 | Ground |
| 7 | GPIO4 (GPCLK0) | 8 | GPIO14 (UART TXD) |
| 9 | Ground | 10 | GPIO15 (UART RXD) |
| 11 | GPIO17 | 12 | GPIO18 (PWM0) |
| 13 | GPIO27 | 14 | Ground |
| 15 | GPIO22 | 16 | GPIO23 |
| 17 | 3.3V power | 18 | GPIO24 |
| 19 | GPIO10 (SPI0 MOSI) | 20 | Ground |
| 21 | GPIO9 (SPI0 MISO) | 22 | GPIO25 |
| 23 | GPIO11 (SPI0 SCLK) | 24 | GPIO8 (SPI0 CE0) |
| 25 | Ground | 26 | GPIO7 (SPI0 CE1) |
| 27 | ID_SD (reserved) | 28 | ID_SC (reserved) |
| 29 | GPIO5 | 30 | Ground |
| 31 | GPIO6 | 32 | GPIO12 (PWM0) |
| 33 | GPIO13 (PWM1) | 34 | Ground |
| 35 | GPIO19 (PWM1) | 36 | GPIO16 |
| 37 | GPIO26 | 38 | GPIO20 |
| 39 | Ground | 40 | GPIO21 |
The GPIO numbering ("GPIOxx") refers to the Broadcom/RP1 signal name used in software (e.g., gpiozero, RPi.GPIO, or lgpio libraries), which is different from the physical pin position — a common source of wiring mistakes for anyone following beginner-friendly Pi builds.
Voltage, Current, and Signal Specs You Need to Know
A few electrical rules govern every pin on the header, and getting them wrong is the fastest way to damage a board:
- Logic level is 3.3V, not 5V tolerant. Despite some older forum claims about tolerance, Raspberry Pi GPIO pins are rated for 3.3V signaling only. Connecting a 5V sensor output directly to a GPIO input risks damaging the RP1 chip — use a logic-level shifter or resistor divider.
- 5V pins (2 and 4) are unregulated pass-throughs from the board's main power input, not a separate regulated rail. Per Raspberry Pi's official specifications, the Pi 5 is designed around a 5V/5A USB-C power supply, so headroom for peripherals pulling from pin 2/4 depends on what else the board itself is drawing.
- 3.3V pins (1 and 17) are current-limited and intended for low-draw sensors and logic-level HATs, not motors or high-current modules.
- Ground pins are not interchangeable with signal returns on other boards — always tie grounds together first when combining the Pi with external power supplies to avoid floating references.
What's New Beyond the GPIO Header: RP1, PCIe, Fan, and RTC
The 40-pin header is only part of the Pi 5's I/O story. Several new connectors sit alongside it on the board:
- RP1 I/O controller. Raspberry Pi's custom southbridge chip now manages GPIO, dual camera/display MIPI lanes, USB, and Ethernet, replacing direct SoC handling used on the Pi 4. This is transparent to most GPIO wiring but can affect very timing-sensitive drivers, per coverage from Jeff Geerling's Pi 5 review.
- PCIe FFC connector. A dedicated flat-flex-cable PCIe 2.0 x1 connector — separate from the GPIO header — enables NVMe SSD HATs and other PCIe expansion boards, a first for the standard Pi form factor.
- 4-pin fan connector. Supports the official Active Cooler with PWM-controlled fan speed, tied to onboard thermal management rather than a GPIO pin.
- RTC battery connector. A JST connector for an optional coin-cell battery lets the Pi 5 keep real-time clock state across power loss, useful for headless/offline projects like home automation builds.
- Power button header. A dedicated header for a physical power/reset button, independent of the GPIO block.
All of these connectors are documented in Raspberry Pi's official specifications page.
Raspberry Pi 5 vs Raspberry Pi 4 Pinout: What Changed and What Didn't
| Aspect | Raspberry Pi 4 | Raspberry Pi 5 |
|---|---|---|
| GPIO header | 40-pin, 2.54mm pitch | Same 40-pin layout, same numbering |
| I/O management | Direct via Broadcom SoC | Routed through RP1 southbridge chip |
| PCIe expansion | Not present on header | Dedicated FFC connector (separate from GPIO) |
| Fan control | Basic GPIO-driven fan option on some cases | Dedicated 4-pin PWM fan connector |
| RTC battery | Not standard | Dedicated JST RTC battery connector |
| Power button | Not standard | Dedicated header |
| GPIO voltage | 3.3V logic, not 5V tolerant | 3.3V logic, not 5V tolerant (unchanged) |
The practical takeaway: existing GPIO wiring diagrams, jumper cables, and most HATs built for the Pi 4 carry over to the Pi 5 without modification, per official documentation. The differences are additive — new connectors sit beside the header rather than replacing it — which is also covered in the Pi 5 specs deep-dive and in how it stacks up against the Raspberry Pi 500 Plus lineup.
Real-World Pinout Use Cases
The GPIO header's dedicated function pins map directly to common maker projects:
- I2C (pins 3, 5): Reading temperature/humidity sensors, OLED displays, or real-time clock modules — a staple of beginner no-solder builds.
- SPI (pins 19, 21, 23, 24, 26): Driving small TFT/LCD displays and reading fast ADCs, common in advanced adult projects that need higher data rates than I2C offers.
- UART (pins 8, 10): Serial console access or communicating with GPS modules and other microcontrollers.
- PWM (pins 12, 32, 33, 35): Controlling servo motors, LED brightness, and fan speed — useful for kid-friendly robotics projects.
- Digital GPIO: Button inputs and relay outputs for home automation triggers, a core building block across the broader home automation project list.
On the display side, the Pi 5 outputs video over micro-HDMI rather than the GPIO header, so builders retrofitting a project into an older VGA-only monitor typically chain a micro-HDMI-to-HDMI cable into a standard HDMI-to-VGA adapter or HDMI-to-VGA cable rather than wiring anything through the 40-pin block.
Citations and sources
- https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
- https://www.raspberrypi.com/products/raspberry-pi-5/specifications/
- https://www.jeffgeerling.com/blog/2023/raspberry-pi-5-is-here-and-its-fast
This piece is editorial synthesis based on publicly available information. No independent first-party benchmarking is reported.
Products mentioned in this article
Amazon & eBay listings, plus full specs and alternatives on each product page.
As an Amazon Associate, SpecPicks earns from qualifying purchases; we also earn on qualifying eBay purchases via the eBay Partner Network. Prices shown were last tracked at crawl time and may vary — check the listing for the current price.
Related reading
- Halloween Talking Prop: Qwen3 4B on Jetson Orin Nano Super vs Raspberry Pi 5 16GB
- Raspberry Pi 4 8GB vs Ryzen 5 5600X: Gemma 3 1B Always-On
- Qwen3 0.6B: Raspberry Pi 4 8GB vs Ryzen 5 5600G for Tiny-Model Hosts (2026)
- Qwen3 8B: Raspberry Pi 4 8GB vs RTX 3060 12GB (2026)
- Raspberry Pi 4 as an SMB1 File Server for Windows 98 Retro Rigs
- Build a Raspberry Pi Bird-Song Logger with a USB Mic (2026)