The Raspberry Pi 3 (Model B, B+, and A+) utilizes a standard 40-pin GPIO header. Pin 1 is the 3.3V power rail, located on the side of the header closest to the SD card slot and the USB ports. When writing code, you must choose between BCM (Broadcom SoC channel numbers) and BOARD (physical pin numbers) numbering systems; BCM is the standard for Python libraries like gpiozero and modern C/C++ implementations, while BOARD is often used in legacy RPi.GPIO scripts.

Below is the definitive raspberry pi3 pinout reference. Bookmark this page for your workbench.

The Complete 40-Pin Raspberry Pi 3 Pinout Table

This table maps the physical header layout (left column = odd pins, right column = even pins) to the Broadcom (BCM) GPIO numbers and their primary default functions. Always verify your specific Pi 3 revision if using alternative SPI/I2C overlays.

Phys BCM Name / Function Mode Phys BCM Name / Function Mode
1-3.3V PowerPWR2-5V PowerPWR
32GPIO2 (SDA1)I2C4-5V PowerPWR
53GPIO3 (SCL1)I2C6-GroundGND
74GPIO4 (GPCLK0)GPIO814GPIO14 (TXD0)UART
9-GroundGND1015GPIO15 (RXD0)UART
1117GPIO17GPIO1218GPIO18 (PWM0)PWM
1327GPIO27GPIO14-GroundGND
1522GPIO22GPIO1623GPIO23GPIO
17-3.3V PowerPWR1824GPIO24GPIO
1910GPIO10 (MOSI0)SPI20-GroundGND
219GPIO9 (MISO0)SPI2225GPIO25GPIO
2311GPIO11 (SCLK0)SPI248GPIO8 (CE0)SPI
25-GroundGND267GPIO7 (CE1)SPI
270GPIO0 (ID_SD)EEPROM281GPIO1 (ID_SC)EEPROM
295GPIO5GPIO30-GroundGND
316GPIO6GPIO3212GPIO12 (PWM0)PWM
3313GPIO13 (PWM1)PWM34-GroundGND
3519GPIO19 (MISO1)SPI/PWM3616GPIO16 (CE2)GPIO
3726GPIO26GPIO3820GPIO20 (MOSI1)SPI
39-GroundGND4021GPIO21 (SCLK1)SPI

Harness Wiring Color Codes and Regional Standards

When building permanent enclosures or wiring the Pi 3 to external sensors, relays, or mains-contactors, the jumper wires on your breadboard must transition to a structured harness. The color coding for these harnesses depends on your region and the governing electrical standard. While the Pi itself doesn't enforce a color code, adopting a strict standard prevents catastrophic cross-wiring when you open the enclosure six months later.

Warning: Never use mains-voltage wire colors (like green/yellow for earth) for low-voltage DC signal lines inside a mixed-voltage enclosure. It creates a lethal assumption for the next technician who opens the box.
Function Dupont / Hobby Standard IEC 60446 (EU / Global) NEC / US DC Practice Old UK (Pre-2004)
Ground (GND) Black Blue (DC) / Green-Yellow (Earth) Black or White (Grounded) Black
3.3V Logic Power Red (often confused with 5V) Brown (DC+) Red or Orange Red
5V Power Rail Red Orange or Yellow (DC+ High) Red (if 3.3V is Orange) Yellow
I2C Data (SDA) Blue Green Green Green
I2C Clock (SCL) Yellow White or Grey White or Blue/White White

Which standard applies to you? If you are building a consumer product for the European market, your internal DC harness must follow IEC 60446 guidelines (Brown for positive, Blue for negative/ground). If you are in the US and wiring a custom control panel, NEC-style DC practice (often Red/Black or Orange/Black depending on voltage tier) is standard. For pure hobbyist bench work, the Dupont standard (Red=VCC, Black=GND) is universally understood, but you must explicitly differentiate 3.3V (use Orange) from 5V (use Red) to avoid frying 3.3V sensors.

Rows People Get Wrong (and How to Avoid Bricking Your Pi)

The Raspberry Pi 3's BCM2837 SoC is strictly a 3.3V logic device. Feeding 5V into any GPIO pin (except the dedicated 5V power pins) will instantly destroy the SoC's ESD protection diodes and permanently brick the board. Here are the specific rows and scenarios where builders make fatal mistakes:

1. The 3.3V vs 5V Power Rail Confusion (Pins 1, 2, 4, 17)

Pin 1 and Pin 17 output 3.3V. Pins 2 and 4 output 5V. When wiring a sensor that requires 5V (like an ultrasonic HC-SR04), you must power it from Pin 2 or 4. However, the echo pin from that sensor will output 5V. You must use a voltage divider (e.g., 1kΩ and 2kΩ resistors) to drop the 5V echo signal down to 3.3V before it hits the Pi's GPIO input pin. Plugging a 5V echo directly into BCM 23 will kill the pin.

2. UART TX/RX Crossover (Pins 8 and 10)

Pin 8 is TXD (Transmit) and Pin 10 is RXD (Receive). When connecting the Pi to a microcontroller (like an Arduino or ESP32), you must cross the lines: Pi TX (Pin 8) goes to the external device's RX, and Pi RX (Pin 10) goes to the external device's TX. Furthermore, ensure the external device is also running at 3.3V logic. Connecting a 5V Arduino's TX directly to the Pi's RX (Pin 10) will fry the Pi.

3. I2C Missing Pull-Up Resistors (Pins 3 and 5)

Pins 3 (SDA) and 5 (SCL) are the primary I2C bus. The Raspberry Pi 3 includes 1.8kΩ hardware pull-up resistors to 3.3V on these pins on the PCB itself. If you are wiring multiple I2C devices, do not add external pull-up resistors to your sensor breakouts unless you have disabled the onboard ones (which requires PCB trace cutting). Adding parallel pull-ups lowers the equivalent resistance, causing the I2C bus to fail due to excessive current draw and signal distortion.

4. The EEPROM ID Pins (Pins 27 and 28)

Pins 27 (GPIO0) and 28 (GPIO1) are reserved for the HAT (Hardware Attached on Top) identification EEPROM. Do not use these for general-purpose I/O in your scripts. The Pi's bootloader queries these pins on startup to auto-configure GPIO states. Toggling them in your Python code can cause boot failures if a HAT is attached.

Safe Interpretation and Debugging Faded Boards

In industrial or outdoor environments, the white silkscreen text on the Raspberry Pi 3 PCB can fade, or the header might be obscured by a ribbon cable or a tightly fitted HAT. When you cannot read the pin labels, you must rely on physical board markers and multimeter verification to safely interpret the pinout.

Finding Pin 1 Without Silkscreen

  1. The Square Pad Rule: Flip the Pi over (or look closely at the base of the header pins). Pin 1 is always indicated by a square copper pad on the PCB, while all other pins (2 through 40) have round copper pads.
  2. The Component Edge Rule: Pin 1 is always on the row closest to the main SoC chip, and it is the pin closest to the SD card slot / USB ports edge of the board.
  3. The Triangle Marker: On some third-party Pi 3 clones and early B+ revisions, a tiny white triangle is printed on the PCB next to Pin 1, pointing directly at it.

Verifying Rails with a Multimeter

Never guess power rails on an unmarked or obscured board. Before connecting sensitive 3.3V logic, perform a live verification:

  1. Power the Pi via its micro-USB port.
  2. Set your digital multimeter (DMM) to DC Voltage.
  3. Place the black probe on a known ground (the metal shielding of the USB ports is grounded and provides a large, safe contact area).
  4. Probe the suspected Pin 1. It should read between 3.28V and 3.32V. If it reads ~5.0V, you are on Pin 2 or 4. If it reads 0V, you are on a GND pin or the board is unpowered.
Bench Tip: If your Pi 3 measures 4.8V or lower on the 5V rail (Pins 2/4), your power supply is sagging under load, or your micro-USB cable has too high a resistance. This brownout condition will cause random GPIO resets and USB disconnects. Upgrade to a 5.1V / 2.5A official power supply to resolve it.

For interactive software verification, you can always run pinout in the Raspberry Pi OS terminal. This built-in utility prints an ASCII art diagram of the raspberry pi3 pinout directly to your SSH session, providing a reliable digital reference when the physical board is buried inside an enclosure. For deeper hardware debugging and overlay configuration, consult the official Raspberry Pi GPIO documentation and community resources like Pinout.xyz.