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.

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.Watch out

3.Full pin reference

Every pin, alias and mapping. This is the table that prints.

Table 1. Pin assignments.

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

Found a wrong pin? The whole board is one file, data/boards/raspberry-pi-40-pin.json.

Edit this file on GitHubReport it instead