Raspberry Pi 5 pinout

Raspberry Pi 5, BCM2712, 3.3 V logic, 85×56 mm, 40 pins

verified17.10.2026

Which Raspberry Pi 5 pins are safe to use

Free to use

GPIO0, GPIO1, GPIO4-13, GPIO15-27

Use with care

  • GPIO2, GPIO3: onboard pull-up or divider.
  • GPIO14: signal at boot.

Important

  • 3.3 V logic. Do not apply 5 V to a GPIO: the pins do not tolerate 5 V and the whole board can burn out. For 5 V sensors use a divider or a level shifter.
  • In programs, numbering is by BCM (GPIO17), not by pin number (11). The board has no pin labels, only the number 1 at the first pin.
  • Current: the pins are rated for 16 mA, while the whole 3.3 V rail on the GPIO is good for about 3 mA per pin on average (Raspberry Pi documentation). Relays, motors and strips only through a transistor and from a separate supply.
  • Default buses: I2C1 on GPIO2/3 (pins 3/5, with 1.8 kΩ pull-ups), SPI0 on GPIO10/9/11, CE0 8, CE1 7, UART on GPIO14/15. Enable them in raspi-config or config.txt.
  • No analog inputs: for an ADC you need an external module (ADS1115, MCP3008).
  • Hardware PWM: GPIO12, 13, 18, 19 (two channels). I2S (PCM) audio: GPIO18–21.
  • On the Pi 5 the GPIO comes from the RP1 chip, not from the processor: old libraries that write to the BCM registers directly (RPi.GPIO, pigpio, WiringPi) do not work. Use libgpiod, gpiozero (lgpio), pinctrl.
  • In gpiod the chip number for the header is gpiochip4 on older kernels and gpiochip0 on newer ones: the line number is still the BCM number.
  • The main UART on GPIO14/15 is free (Bluetooth uses a separate UART); the debug UART is a separate 3-pin connector.
  • Power supply: 5 V 5 A (27 W). With a 3 A supply USB devices are limited to 600 mA.

All pins

LabelNumberFunctionsLimitsCheck
5Vpin 25 Vpower inputpower outputverified
5Vpin 45 Vpower inputpower outputverified
GNDpin 6Groundverified
GPIO14GPIO14, pin 8interrupt (edge, via gpiod)software PWMUART TXD (console, if enabled)not 5 V tolerantoutputs a signal at bootverified
GPIO15GPIO15, pin 10interrupt (edge, via gpiod)software PWMUART RXD (console, if enabled)not 5 V tolerantverified
GPIO18GPIO18, pin 12interrupt (edge, via gpiod)PWM0PCM CLK (I2S)SPI1 CE0not 5 V tolerantverified
GNDpin 14Groundverified
GPIO23GPIO23, pin 16interrupt (edge, via gpiod)software PWMnot 5 V tolerantverified
GPIO24GPIO24, pin 18interrupt (edge, via gpiod)software PWMnot 5 V tolerantverified
GNDpin 20Groundverified
GPIO25GPIO25, pin 22interrupt (edge, via gpiod)software PWMnot 5 V tolerantverified
GPIO8GPIO8, pin 24interrupt (edge, via gpiod)software PWMSPI0 CE0not 5 V tolerantverified
GPIO7GPIO7, pin 26interrupt (edge, via gpiod)software PWMSPI0 CE1not 5 V tolerantverified
GPIO1GPIO1, pin 28interrupt (edge, via gpiod)software PWMID_SC (I2C0 SCL) — EEPROM HATnot 5 V tolerantverified
GNDpin 30Groundverified
GPIO12GPIO12, pin 32interrupt (edge, via gpiod)PWM0not 5 V tolerantverified
GNDpin 34Groundverified
GPIO16GPIO16, pin 36interrupt (edge, via gpiod)software PWMSPI1 CE2not 5 V tolerantverified
GPIO20GPIO20, pin 38interrupt (edge, via gpiod)software PWMPCM DIN (I2S)SPI1 MOSInot 5 V tolerantverified
GPIO21GPIO21, pin 40interrupt (edge, via gpiod)software PWMPCM DOUT (I2S)SPI1 SCLKnot 5 V tolerantverified
3V3pin 13.3 Vpower outputverified
GPIO2GPIO2, pin 3interrupt (edge, via gpiod)software PWMI2C1 SDAnot 5 V tolerantonboard pull-upverified
GPIO3GPIO3, pin 5interrupt (edge, via gpiod)software PWMI2C1 SCLnot 5 V tolerantonboard pull-upverified
GPIO4GPIO4, pin 7interrupt (edge, via gpiod)software PWMGPCLK01-Wire (dtoverlay=w1-gpio by default)not 5 V tolerantverified
GNDpin 9Groundverified
GPIO17GPIO17, pin 11interrupt (edge, via gpiod)software PWMSPI1 CE1not 5 V tolerantverified
GPIO27GPIO27, pin 13interrupt (edge, via gpiod)software PWMnot 5 V tolerantverified
GPIO22GPIO22, pin 15interrupt (edge, via gpiod)software PWMnot 5 V tolerantverified
3V3pin 173.3 Vpower outputverified
GPIO10GPIO10, pin 19interrupt (edge, via gpiod)software PWMSPI0 MOSInot 5 V tolerantverified
GPIO9GPIO9, pin 21interrupt (edge, via gpiod)software PWMSPI0 MISOnot 5 V tolerantverified
GPIO11GPIO11, pin 23interrupt (edge, via gpiod)software PWMSPI0 SCLKnot 5 V tolerantverified
GNDpin 25Groundverified
GPIO0GPIO0, pin 27interrupt (edge, via gpiod)software PWMID_SD (I2C0 SDA) — EEPROM HATnot 5 V tolerantverified
GPIO5GPIO5, pin 29interrupt (edge, via gpiod)software PWMGPCLK1not 5 V tolerantverified
GPIO6GPIO6, pin 31interrupt (edge, via gpiod)software PWMGPCLK2not 5 V tolerantverified
GPIO13GPIO13, pin 33interrupt (edge, via gpiod)PWM1not 5 V tolerantverified
GPIO19GPIO19, pin 35interrupt (edge, via gpiod)PWM1PCM FS (I2S)SPI1 MISOnot 5 V tolerantverified
GPIO26GPIO26, pin 37interrupt (edge, via gpiod)software PWMnot 5 V tolerantverified
GNDpin 39Groundverified

Sources

Every pin is verified against the manufacturer's documents.

  • Raspberry Pi Documentation: GPIO and the 40-pin headeruser guide, checked 17.10.202640 pin functions (3V3, 5V, GND, GPIO by BCM), 3.3 V logic, output up to 16 mA per pin (4 mA by default on the 4 series, up to 8), GPIO2/3 pull-ups, ID_SD/ID_SC for the HAT EEPROM
  • pinout.xyz (cross-check of alternate functions)third-party source, checked 17.10.2026I2C1 on 2/3, SPI0 on 7–11, SPI1 on 16–21, UART on 14/15, PWM on 12, 13, 18, 19, PCM on 18–21, GPCLK on 4–6
  • RP1 Peripherals (Raspberry Pi)datasheet, checked 17.10.2026The Pi 5 header GPIO comes from the RP1 (bank 0, GPIO0–27), 3.3 V, UART, I2C, SPI, PWM, PCM functions on the same numbers
  • Raspberry Pi 5 mechanical drawingboard drawing, checked 17.10.2026board 85×56 mm, holes 58×49, GPIO header 29 mm from the hole, USB-C 11.2, micro-HDMI 25.8 and 39.2 mm, Ethernet and USB on the right

Size: per the Raspberry Pi mechanical drawing.

FAQ

Which Raspberry Pi 5 pins are I2C, SPI and UART?
By default in Raspberry Pi OS (default in config.txt / dtoverlay): I2C: SDA GPIO2, SCL GPIO3; SPI: MOSI GPIO10, MISO GPIO9, SCK GPIO11, SS GPIO8; UART: TX GPIO14, RX GPIO15.
Are the Raspberry Pi 5 pins 5 V tolerant?
No. The logic is 3.3 V and the pins are not 5 V tolerant: use a divider or a level shifter for 5 V signals.

You might also need

Similar boards

Next

Need firmware or a device built on BCM2712? I'll build it to order