The Raspberry Pi 3 (Model B and B+) utilizes a 40-pin GPIO header. Pin 1 is the 3.3V pin located at the top-left when the board is oriented with the USB ports facing you and the GPIO header on the top right. Unlike microcontrollers with 5V-tolerant logic, the Pi 3's BCM2837 SoC operates strictly at 3.3V; applying 5V to any GPIO pin will permanently destroy the processor. Below is the complete hardware reference, followed by wiring standards and a concrete decision matrix for your next build.

The Complete 40-Pin GPIO Raspberry Pi 3 Pinout Table

This spec-sheet-table maps the physical header. The left bank represents odd pins (closest to the board edge), and the right bank represents even pins.

PinFunction / LabelBCM GPIOPinFunction / LabelBCM GPIO
13.3V Power-25V Power-
3I2C SDA1GPIO 245V Power-
5I2C SCL1GPIO 36Ground (GND)-
7General GPIOGPIO 48UART TXDGPIO 14
9Ground (GND)-10UART RXDGPIO 15
11General GPIOGPIO 1712PWM0 / PCMGPIO 18
13General GPIOGPIO 2714Ground (GND)-
15General GPIOGPIO 2216General GPIOGPIO 23
173.3V Power-18General GPIOGPIO 24
19SPI MOSIGPIO 1020Ground (GND)-
21SPI MISOGPIO 922General GPIOGPIO 25
23SPI SCLKGPIO 1124SPI CE0GPIO 8
25Ground (GND)-26SPI CE1GPIO 7
27HAT ID_SDGPIO 028HAT ID_SCGPIO 1
29General GPIOGPIO 530Ground (GND)-
31General GPIOGPIO 632PWM0GPIO 12
33PWM1GPIO 1334Ground (GND)-
35SPI1 MISOGPIO 1936SPI1 CE2GPIO 16
37General GPIOGPIO 2638SPI1 MOSIGPIO 20
39Ground (GND)-40SPI1 SCLKGPIO 21

DC Color Codes: IEC vs. NEC vs. Standard Ribbons

When wiring custom harnesses, terminal blocks, or PCBs that interface with the Pi's GPIO, you must adhere to low-voltage DC color standards. Standard 40-pin rainbow ribbon cables are notorious for causing errors because they prioritize aesthetics over electrical code. Here is how regional standards apply to Pi projects:

StandardRegion / ScopePositive (+VDC)Negative / Ground (0V)Application to Pi 3
IEC 60446EU / InternationalBrownBlueUse Brown for 3.3V/5V, Blue for GND on custom screw terminals.
US NEC (Art. 250/480)North AmericaRed (or Black)Black (or White/Grey)Use Red for 5V, Black for GND. White is rarely used in 3.3V logic.
Old UK StandardPre-2004 UKRedBlackMatches standard Dupont jumper wire conventions.
Rainbow RibbonHobbyist DefaultRed (usually Pin 1)Black (usually Pin 2)Warning: Pin 1 is 3.3V, Pin 2 is 5V. Do not assume Red = 5V on ribbons.
Bench Tip: If you are building a permanent installation in the US, follow NEC-style DC conventions: Red for 5V (Pins 2/4), Orange for 3.3V (Pins 1/17), and Black for Ground. This prevents confusion when troubleshooting alongside standard 120V AC wiring in the same enclosure.

The 'Fried Pi' Trap: Rows Makers Get Wrong

According to community failure logs on Pinout.xyz, the vast majority of dead Pi 3 boards share three specific wiring mistakes. Understanding these rows is critical for hardware survival.

  • The 5V vs 3.3V Swap (Pins 1, 2, 4, 17): The Pi's 5V pins (2 and 4) are directly tied to the USB power input. They can supply significant current but have zero regulation for logic. The 3.3V pins (1 and 17) are regulated. Feeding 5V into a GPIO pin (like Pin 3) bypasses internal protection diodes and instantly fries the BCM2837 SoC.
  • The UART Cross-Wire (Pins 8 and 10): Pin 8 is TXD (Transmit) and Pin 10 is RXD (Receive). Makers frequently wire TX to TX and RX to RX. You must cross the lines: Pi TX (8) goes to Peripheral RX, and Pi RX (10) goes to Peripheral TX.
  • The HAT EEPROM Pins (Pins 27 and 28): GPIO 0 (ID_SD) and GPIO 1 (ID_SC) are reserved for the HAT identification I2C bus. They have onboard pull-ups and are read at boot. Do not use these for general-purpose I/O or you will cause boot failures or I2C bus contention.
  • Missing I2C Pull-ups: Pins 3 (SDA) and 5 (SCL) already have 1.8kΩ pull-up resistors to 3.3V on the Pi board. If your sensor module also has pull-ups, the combined resistance may drop too low, causing signal degradation. Always check your sensor module for jumper pads to disable duplicate pull-ups.
Safety & Hardware Warning: Never hot-plug SPI or I2C peripherals while the Pi is powered. The BCM2837 GPIO pins are not hot-swap tolerant. Inrush currents from capacitive loads on sensor modules can latch up the silicon. Always de-energize the board, make connections, and then apply power.

Decision Tree: Which GPIO Pin Should You Use?

Do not pick pins randomly based on physical convenience. Use this decision-tree-table to select the correct hardware-backed pins for your protocol, terminating in the exact pin and required support component.

If your project needs...Then choose Protocol...Concrete Pin Pick (Physical)Required Support Component / Note
Basic on/off switching (relays, LEDs)Digital OutputPins 11, 13, 15, 16, 18 (GPIO 17, 27, 22, 23, 24)Use a 2N2222 transistor or ULN2003 driver; never drive >16mA directly from the pin.
Connecting OLEDs, BME280, or IMUsI2CPins 3 (SDA) & 5 (SCL)No external pull-ups needed (Pi has 1.8kΩ onboard). Ensure device is 3.3V tolerant.
High-speed displays or ADC chipsSPI0Pins 19, 21, 23, 24 (MOSI, MISO, SCLK, CE0)Use a logic level shifter (e.g., SN74LVC8T245) if interfacing with 5V SPI devices.
Motor control, servos, or dimmingHardware PWMPin 12 (GPIO 18) or Pin 32 (GPIO 12)These are the only true hardware PWM pins. All others rely on CPU-timed software PWM.
GPS modules, serial consolesHardware UARTPins 8 (TX) & 10 (RX)Must disable serial console in raspi-config to free up /dev/ttyAMA0.

Safe Interpretation When Header Markings Are Faded

On older Pi 3 boards, or when using third-party clone boards with poor silkscreen printing, the 'Pin 1' indicator may be invisible. Guessing incorrectly and applying 5V to Pin 2 while thinking it is Ground will destroy the board. Use these physical landmarks to verify orientation:

  1. The Square Pad Method (Most Reliable): Flip the Raspberry Pi over and look at the solder joints on the underside of the GPIO header. Pin 1 is the only pin with a square solder pad. Every other pin (2 through 40) has a perfectly round solder pad.
  2. The Component Edge Method: Orient the board so the USB and Ethernet ports are facing toward you. The GPIO header runs along the top right edge. Pin 1 is always the top-left pin of that header block (closest to the SD card slot and the main CPU).
  3. The Continuity Test: If the board is unpowered and you have a multimeter, set it to continuity mode. Probe the metal shielding of the USB ports (which is tied to Ground) and test the suspected ground pins (6, 9, 14, 20, 25, 30, 34, 39). Once you map the grounds, you can mathematically deduce the remaining pins based on the 40-pin layout table above.

For comprehensive schematic details and official hardware specifications, always refer to the official Raspberry Pi documentation. When in doubt, default to IEC/NEC color standards for custom wiring, verify Pin 1 via the square solder pad, and never exceed 3.3V on any BCM GPIO pin.