Raspberry Pi Pinout
Click any pin for details. Use the filters to highlight pins by peripheral.
Layout matches the standard 40-pin GPIO header found on every Pi since the Model B+ — Pi 1 B+, 2, 3, 4, 5, Zero, Zero W, and Zero 2 W.
Pin numbers use the BOARD convention; BCM numbers (used by libraries like gpiozero and RPi.GPIO in BCM mode) are shown next to each GPIO label.
About alt modes: Each GPIO can be muxed to one of several alternate functions. Switch the Board dropdown above to see what's available on your specific Raspberry Pi:
- Pi 1 / 2 / 3 / Zero / Zero W / Zero 2 W use the BCM2835/2836/2837 SoCs with a limited ALT0–ALT5 table — UART0/UART1, SPI0/SPI1, I²C-0/I²C-1 only.
- Pi 4 / 400 / CM4 use BCM2711 which added UART2–UART5, SPI3–SPI6, and I²C3–I²C6 across many additional pins.
- Pi 5 / 500 / CM5 route GPIOs through the RP1 I/O chip with a FUNC0–FUNC8 alt scheme. Common defaults are preserved for compatibility; the full RP1 alt table is in the RP1 datasheet.
Enabling extra UARTs / SPIs / I²Cs (Pi 4): the additional peripheral instances are not active by default. Enable them with overlays such as dtoverlay=uart3, dtoverlay=spi3-2cs, or dtoverlay=i2c3 in /boot/firmware/config.txt (or /boot/config.txt on Bullseye and earlier).
HAT EEPROM pins: Pins 27 and 28 (GPIO 0 and 1) are reserved for HAT auto-detection and should not be used for general purpose I/O on production designs, even though they expose I²C/SPI/UART functions.
Pi 1 Rev 1 (26-pin): not shown. Original 2012-era Model A/B used a 26-pin header with GPIO 0/1 (instead of 2/3) for I²C-0 and GPIO 21 (instead of 27). All Pi models from B+ onwards share the 40-pin layout above.