Skip to main content
Raspberry Pi 5 Pinout Guide: The Full 40-Pin GPIO Breakdown

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

A synthesis of official Raspberry Pi 5 pinout documentation covering GPIO voltages, PCIe, fan, and RTC headers — plus what changed from Pi 4.

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.

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.

RailPin countNotes
3.3V power2 (pins 1, 17)Logic-level supply for most HATs
5V power2 (pins 2, 4)Drawn from the board's main power input
Ground (GND)8Distributed across the header for clean returns
GPIO (programmable)26Includes dedicated I2C, SPI, UART, and PWM-capable pins
ID EEPROM pins2 (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.

PinFunctionPinFunction
13.3V power25V power
3GPIO2 (I2C1 SDA)45V power
5GPIO3 (I2C1 SCL)6Ground
7GPIO4 (GPCLK0)8GPIO14 (UART TXD)
9Ground10GPIO15 (UART RXD)
11GPIO1712GPIO18 (PWM0)
13GPIO2714Ground
15GPIO2216GPIO23
173.3V power18GPIO24
19GPIO10 (SPI0 MOSI)20Ground
21GPIO9 (SPI0 MISO)22GPIO25
23GPIO11 (SPI0 SCLK)24GPIO8 (SPI0 CE0)
25Ground26GPIO7 (SPI0 CE1)
27ID_SD (reserved)28ID_SC (reserved)
29GPIO530Ground
31GPIO632GPIO12 (PWM0)
33GPIO13 (PWM1)34Ground
35GPIO19 (PWM1)36GPIO16
37GPIO2638GPIO20
39Ground40GPIO21

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

AspectRaspberry Pi 4Raspberry Pi 5
GPIO header40-pin, 2.54mm pitchSame 40-pin layout, same numbering
I/O managementDirect via Broadcom SoCRouted through RP1 southbridge chip
PCIe expansionNot present on headerDedicated FFC connector (separate from GPIO)
Fan controlBasic GPIO-driven fan option on some casesDedicated 4-pin PWM fan connector
RTC batteryNot standardDedicated JST RTC battery connector
Power buttonNot standardDedicated header
GPIO voltage3.3V logic, not 5V tolerant3.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

Tap any product for full specs, live Amazon & eBay pricing, and alternatives.

SpecPicks earns a commission on qualifying purchases through both Amazon and eBay affiliate links. Prices and stock update independently.

Sources

— SpecPicks Editorial · Last verified 2026-07-23

More guides & deep dives from the SpecPicks archive

Browse all articles & guides →

More reviews from the SpecPicks archive

Browse all reviews →

More buying guides from SpecPicks

Browse all buying guides →