The Raspberry Pi 3 (Model B and B+) features a 40-pin GPIO header. The universally recommended standard for software mapping is BCM (Broadcom SOC channel) numbering, while Physical (Board) numbering is used strictly for physical wiring, ribbon cables, and continuity testing. The Pi 3 operates strictly on 3.3V logic; feeding 5V into any GPIO data pin will permanently destroy the SoC.

The Complete 40-Pin GPIO Pinout Table

Below is the complete hardware reference for the Raspberry Pi 3 40-pin header. This layout is identical across the Pi 3 Model B, Pi 3 Model B+, Pi 4, and Pi 5, though power delivery capabilities on the 5V rail differ by generation.

Physical PinBCM GPIOFunction / NotesWiringPi (Legacy)
1-3.3V Power (Max 50mA draw)-
2-5V Power (Fused)-
32SDA1 (I2C) - 1.8k Pull-up to 3.3V8
4-5V Power (Fused)-
53SCL1 (I2C) - 1.8k Pull-up to 3.3V9
6-Ground-
74GPCLK07
814TXD (UART) - Shared with serial console15
9-Ground-
1015RXD (UART) - Shared with serial console16
1117General Purpose I/O0
1218PCM_CLK / PWM01
1327General Purpose I/O2
14-Ground-
1522General Purpose I/O3
1623General Purpose I/O4
17-3.3V Power (Max 50mA draw)-
1824General Purpose I/O5
1910MOSI (SPI0)12
20-Ground-
219MISO (SPI0)13
2225General Purpose I/O6
2311SCLK (SPI0)14
248CE0 (SPI0 Chip Select)10
25-Ground-
267CE1 (SPI0 Chip Select)11
270ID_SD (I2C) - Reserved for HAT ID30
281ID_SC (I2C) - Reserved for HAT ID31
295General Purpose I/O21
30-Ground-
316General Purpose I/O22
3212PWM0 / PCM_FS26
3313PWM1 / PCM_DOUT23
34-Ground-
3519MISO (SPI1) / PCM_FS24
3616CE2 (SPI1 Chip Select)27
3726General Purpose I/O25
3820MOSI (SPI1) / PCM_DIN28
39-Ground-
4021SCLK (SPI1) / PCM_DOUT29

Standard Variants: BCM vs. Physical vs. WiringPi

Unlike household wiring where regional codes (NEC vs. IEC) dictate color standards, the Raspberry Pi ecosystem is divided by software mapping standards. Choosing the wrong one is the leading cause of "my GPIO pin isn't working" forum posts.

  • BCM (Broadcom SOC Channel): This maps to the internal Broadcom BCM2837 chip pin numbers. It is the undisputed standard for modern Python libraries (gpiozero, RPi.GPIO) and C/C++ libraries (pigpio, lgpio). If you are writing code in 2026, use BCM.
  • Physical (Board): This simply counts the pins 1 through 40 based on their physical location on the header. Use this exclusively when crimping ribbon cables, designing custom PCBs, or verifying continuity with a multimeter. Never use Physical numbering in software unless you are writing a low-level hardware abstraction layer.
  • WiringPi (Legacy): An Arduino-like numbering scheme created by Gordon Henderson. Deprecated in 2019. You will still find it in older C/C++ tutorials and legacy HAT documentation. Do not use it for new projects; migrate legacy code to pigpio or lgpio using BCM mapping.
Warning: The 5V Backpower Hazard
Injecting 5V into Physical Pins 2 or 4 will backpower the Raspberry Pi 3, bypassing the onboard polyfuse and voltage regulation circuitry. If your external 5V source has any ripple or exceeds 5.25V, you risk destroying the Pi's PMIC (Power Management IC). Always power the Pi via the micro-USB port or use a HAT with proper backpower protection diodes.

Rows People Get Wrong (And How They Fry Their Pi)

When interpreting the pinout table above, three specific rows cause 90% of hardware failures and software bugs on the Pi 3.

1. Pin 1 (3.3V) vs. Pin 2 (5V) Reversal

The 3.3V rail on the Pi 3 is generated by an onboard LDO regulator and is strictly limited to ~50mA of external draw. If you accidentally wire a 5V sensor's VCC to Pin 1, it will either fail to power on or brown out the Pi. Conversely, wiring a 3.3V component (like an ESP8266 or NRF24L01) to Pin 2 (5V) will instantly fry the component.

2. GPIO 2 and GPIO 3 (I2C Hardware Pull-ups)

Physical pins 3 and 5 (BCM 2 and 3) are the primary I2C bus. The Pi 3 motherboard features hardwired 1.8kΩ pull-up resistors tying these lines to the 3.3V rail.
The Gotcha: If you attempt to use these pins as standard digital inputs with external push-buttons, the 1.8k pull-up will fight your external resistor network, causing floating logic states. Furthermore, never connect a 5V I2C device (like an Arduino Uno acting as a slave) directly to these pins without a bidirectional logic level shifter (e.g., BSS138 or PCA9306).

3. GPIO 14 and GPIO 15 (UART Console Spam)

Physical pins 8 and 10 (BCM 14 and 15) are the hardware UART. By default, the Pi 3 routes the Linux serial console to these pins. If you connect a GPS module or microcontroller here, your device will be bombarded with Linux boot logs and kernel panics.
The Fix: Run sudo raspi-config, navigate to Interface Options -> Serial Port, disable the "login shell to be accessible over serial", but enable the "serial port hardware".

Safe Pin Identification When Silkscreen is Faded

On older Pi 3 boards, or boards that have undergone heavy flux cleaning and rework, the white silkscreen "1" marking next to the first pin often wears off. Guessing Pin 1 incorrectly by even one row will route 5V directly into a 3.3V GPIO data pin.

Visual Landmark Method:
Orient the Pi 3 so the USB/Ethernet ports are facing toward you and the GPIO header is on the top right. Pin 1 is the top-left pin of the header, located closest to the microSD card slot edge. Pin 2 is immediately to its right.

Multimeter Verification Method (Foolproof):
If visual landmarks are ambiguous due to a custom case or damaged PCB:

  1. Power the Pi 3 via the official micro-USB power supply.
  2. Set your multimeter to DC Voltage (20V range).
  3. Place the black (COM) probe on the metal shielding of any USB port (this is a guaranteed Ground).
  4. Touch the red probe to the suspected Pin 1. If the meter reads 3.2V to 3.4V, you have found Pin 1.
  5. If the meter reads 4.9V to 5.2V, you are touching Pin 2. Move one pin to the left.

Decision Tree: Which Numbering Scheme and Library to Pick

Stop debating which standard to use. Follow this decision path to lock in your software and hardware stack for the Pi 3.

If your scenario is...Then choose this Standard...And use this Library
Writing new Python scripts for sensors/relays BCM gpiozero (Built-in, handles cleanup automatically)
Writing high-frequency C/C++ bit-banging or PWM BCM pigpio (Runs as a daemon, hardware-timed PWM)
Crimping a 40-pin IDC ribbon cable to a perfboard Physical N/A (Hardware only; verify continuity pin-to-pin)
Maintaining a legacy C project from 2017 WiringPi wiringPi (Do not start new projects with this)
Interfacing with an Arduino via Serial BCM (14/15) pyserial (After disabling serial console in raspi-config)
The Default Recommendation: For 95% of Raspberry Pi 3 projects in 2026, standardize on BCM numbering paired with the gpiozero Python library. It abstracts the pinout safely, prevents memory leaks from unclosed pins, and aligns with the official Raspberry Pi Documentation. Reserve Physical numbering strictly for your multimeter and wire-crimping tasks.

For interactive visual mapping and HAT compatibility checks, cross-reference your physical wiring with the community-maintained Pinout.xyz database before applying power to your breadboard.