If you've ever stared at the 40-pin header on a Raspberry Pi and wondered which pin does what, you're not alone. The GPIO (General-Purpose Input/Output) pins are what make the Raspberry Pi more than just a tiny computer they're the bridge between your code and the physical world. A reliable Raspberry Pi GPIO pinout reference sheet saves you from fried components, wiring mistakes, and wasted hours debugging circuits that never had a chance of working.

What exactly is a Raspberry Pi GPIO pinout reference sheet?

It's a visual or tabular guide that maps every pin on the Raspberry Pi's 40-pin GPIO header. Each pin is labeled with its physical position (pin 1 through 40), its Broadcom (BCM) numbering, and its function whether that's a general-purpose I/O pin, a power rail (3.3V or 5V), or a ground connection. Some pins double up as interfaces like I²C, SPI, or UART, and a good reference sheet makes those alternate functions visible at a glance.

Most printable pinout sheets use a monospace layout or color-coded diagram so you can quickly identify pin roles without squinting.

Why do I need a reference sheet if pinout info is online?

You can look up individual pins while you code, but that breaks your workflow especially when you're physically wiring a breadboard with one hand and referencing a tutorial with the other. A printed or saved pinout sheet lets you cross-reference without switching tabs. It also helps you double-check before powering on a circuit, which matters because connecting 5V to a 3.3V GPIO pin can permanently damage your Pi.

Which Raspberry Pi models share the same GPIO pinout?

Every Raspberry Pi with a 40-pin header uses the same pinout layout. That includes:

  • Raspberry Pi 5, 4 Model B, 3 Model B+, 3 Model B, 2 Model B
  • Raspberry Pi Zero 2 W, Zero W, Zero (with headers soldered)
  • Raspberry Pi 400 and 500
  • Raspberry Pi Pico is different it uses a different pin layout entirely

So one reference sheet works across most models. The only thing that changes between models is which pins support which alternate functions at higher speeds (for example, SPI1 availability differs).

What do BCM pin numbers and physical pin numbers mean?

The 40-pin header has physical pin numbers (1–40) counting left to right, top to bottom if you hold the Pi with the GPIO header on the right side and the SD card slot facing you. The BCM numbers are the Broadcom chip's internal numbering for the GPIO-capable pins.

For example, physical pin 7 is BCM GPIO 4. When you write code in Python or use Scratch for GPIO control, you usually reference the BCM number, not the physical one. Mixing them up is one of the most common wiring mistakes beginners make.

Which pins are safe to use, and which should I avoid?

Safe for general projects:

  • BCM 2, 3 I²C (with pull-ups already on the board)
  • BCM 4, 17, 27, 22, 10, 9, 11, 5, 6, 13, 19, 26 general-purpose GPIO
  • BCM 14, 15 UART serial
  • BCM 7, 8, 11 SPI bus (CE1, CE0, SCLK)

Pins to treat with caution:

  • Physical pins 1 and 17 3.3V power. Never connect these to 5V or to a ground accidentally.
  • Physical pins 2 and 4 5V power. These bypass the Pi's voltage regulator for external components, but shorting them can destroy the board.
  • BCM 0 and 1 used internally for HAT ID EEPROM. Avoid unless you know exactly what you're doing.
  • BCM 16 used by the Pi's onboard low-voltage detect circuit on some models.

What are common mistakes when using GPIO pins?

After helping hundreds of beginners in the Raspberry Pi community, these errors come up again and again:

  1. Confusing BCM and physical numbering in code. If your LED won't light up but the wiring looks right, check this first. Our walkthrough on controlling GPIO pins with Scratch covers how to set the correct numbering mode.
  2. Driving too much current from a GPIO pin. Each pin sources about 16mA max, with a total board limit around 50mA. Driving an LED without a resistor, or trying to power a motor directly, will burn out the pin.
  3. Connecting 5V sensors to 3.3V GPIO pins. Most Arduino sensors output 5V logic. Feeding that into a Pi GPIO pin can damage the processor. Use a level shifter or voltage divider.
  4. Not using a breadboard or breakout board. Jumper wires pushed directly onto header pins can slip and cause short circuits.
  5. Forgetting pull-up or pull-down resistors on input pins, leading to floating readings and unreliable button presses.

If you run into errors while coding your GPIO projects, our common Raspberry Pi error solutions guide covers the fixes most people need.

How should I print or format my GPIO pinout sheet?

A few practical tips for making your reference sheet actually useful:

  • Print it on a single page in landscape orientation. Tape it to the wall next to your workspace.
  • Color-code by function: red for power, black for ground, green for general GPIO, blue for I²C/SPI/UART.
  • Include both BCM and physical numbers side by side so you never have to convert mentally.
  • Use a clean technical font that's legible at small sizes labels on pinout diagrams get crowded fast.
  • Keep a digital copy on your phone for when you're away from your desk.

Can I test GPIO pins without wiring a full circuit?

Yes. The simplest way is to use Python with the gpiozero or RPi.GPIO library to toggle pins high and low, then verify with a multimeter. Set up your coding environment first by following our Thonny IDE setup guide, then run a short script to test each pin you plan to use.

You can also use pinout, a command-line tool that prints your specific board's pinout directly in the terminal. Just type pinout and hit enter. It detects your Pi model and shows the correct layout automatically.

Quick reference: 40-pin GPIO header at a glance

PhysBCMNameFunction
1 3.3VPower
2 5VPower
32SDA1I²C / GPIO
4 5VPower
53SCL1I²C / GPIO
6 GNDGround
74GPIO4General GPIO
814TXDUART / GPIO
9 GNDGround
1015RXDUART / GPIO
1117GPIO17General GPIO
1218GPIO18PWM / GPIO
1327GPIO27General GPIO
14 GNDGround
1522GPIO22General GPIO
1623GPIO23General GPIO
17 3.3VPower
1824GPIO24General GPIO
1910MOSISPI / GPIO
20 GNDGround
219MISOSPI / GPIO
2225GPIO25General GPIO
2311SCLKSPI / GPIO
248CE0SPI / GPIO
25 GNDGround
267CE1SPI / GPIO
270SDA0I²C EEPROM
281SCL0I²C EEPROM
295GPIO5General GPIO
30 GNDGround
316GPIO6General GPIO
3212GPIO12PWM / GPIO
3313GPIO13PWM / GPIO
34 GNDGround
3519GPIO19PWM / GPIO
3616GPIO16General GPIO
3726GPIO26General GPIO
3820GPIO20General GPIO
39 GNDGround
4021GPIO21General GPIO

Your next steps

Here's a quick checklist to put your pinout knowledge to work:

  • ✅ Print or save a color-coded GPIO pinout sheet and keep it at your workspace
  • ✅ Run pinout in your terminal to confirm your board model and pin layout
  • ✅ Decide whether your code will use BCM or physical numbering and stay consistent
  • ✅ Calculate total current draw before connecting multiple components
  • ✅ Set up your Python environment using Thonny IDE and write a simple LED blink script to verify your first pin works
  • ✅ Test with a multimeter before connecting sensitive components

Start with one pin, one LED, and one resistor. Get that working, then expand. The GPIO header is powerful, but respect the limits and you'll avoid the mistakes that trip up most beginners.