Skip to content
A project ofgwark.dev

Raspberry Pi · Single-board computer

Raspberry Pi 40-pin GPIO Header

The J8 header shared by every 40-pin Raspberry Pi, from the Model B+ through the Pi 5. Names are BCM numbers, which is what libgpiod, pigpio and the Python GPIO libraries expect. The alternate functions listed are the BCM283x / BCM2711 ones; the Pi 5 routes the header through its RP1 chip, which has a different function table.

Cheat sheet (SVG)
Logic level
3.3 V
Package
2x20 2.54 mm header (J8)

1.Pinout diagram

Highlight a signalhover to preview, click to keep

Odd pins

RPI 40-PIN

Even pins

Pin detail

Hover a pin for its mappings and gotchas. Click to keep it here.

Logic level
3.3 V
Package
2x20 2.54 mm header (J8)

Fig. 1. Raspberry Pi 40-pin GPIO Header, 2x20 2.54 mm header (J8). Hover or tap a signal to light up every pin that carries it.

2.Caution

3.Full pin reference

Every pin, alias and mapping. This table is included when you print the page.

Table 1. Pin assignments.

Complete pin reference for Raspberry Pi 40-pin GPIO Header
PinNameFunctions

To fix a wrong pin, edit data/boards/raspberry-pi-40-pin.json.

Edit this file on GitHubOpen an issue