Raspberry Pi GPIO Pinout
Complete 40-pin layout — physical pin number, BCM number, and I²C/SPI/UART at a glance.
What it does: Look up what each of the Raspberry Pi 40-pin header pins is (power/ground/GPIO/bus).
When to use it: When wiring sensors, attaching HATs, or matching pins while writing GPIO code.
Disclaimer: This result is a reference estimate. For actual production, refer to the device datasheet / local regulations as authoritative.
MEANS The left and right columns are the actual odd/even rows of the physical header; use GPIOxx (BCM) in code, and count physical pin numbers when wiring.
No history yet. Each calculation is automatically saved to this device.
How to read the Raspberry Pi GPIO header
The left and right columns map to the actual header.
- 01
Match the physical header
The two columns below are the actual 2×20 header: odd pins on the left, even pins on the right, matching the header on the board one for one.
- 02
Read the BCM number
When programming (Python gpiozero / RPi.GPIO BCM mode) you use the BCM number
GPIOxx, not the physical pin number. - 03
Identify power and ground
Red=5V, orange=3V3, grey=GND. These are power/ground — do not use them as signal pins.
Common function-pin quick reference
The most frequently wired bus pins (BCM number · physical pin).
| Function | BCM | Physical pin |
|---|---|---|
| I²C SDA | GPIO2 | 3 |
| I²C SCL | GPIO3 | 5 |
| UART TXD | GPIO14 | 8 |
| UART RXD | GPIO15 | 10 |
| SPI MOSI | GPIO10 | 19 |
| SPI MISO | GPIO9 | 21 |
| SPI SCLK | GPIO11 | 23 |
| SPI CE0 | GPIO8 | 24 |
Official Raspberry Pi GPIO documentation + pinout.xyz. Applies to all 40-pin models.
Common questions, answered in 3 minutes
Is the GPIO 5V tolerant?
No. The GPIO signal pins on every Raspberry Pi model are 3.3V logic and are not 5V tolerant — feeding 5V directly into a GPIO will permanently damage the chip. To interface a 5V signal, use level shifting or a divider.
How do I tell the physical pin number from the GPIO number?
The physical pin number is counted 1–40 along the header; the BCM number (GPIOxx) is the chip-internal numbering you use in code. This table gives both — don't mix them up.
Are all Raspberry Pi pinouts the same?
The 40-pin models (Pi 2/3/4/5, Zero/Zero 2, A+/B+) are identical. Only the very old 26-pin Pi 1 (rev1/rev2) has a different layout.
How much current can the 5V and 3V3 pins supply?
It depends on the power supply's headroom and is not unlimited. The 3V3 rail has limited capacity (a few hundred mA), so power large loads separately rather than drawing hard from the header.
Standards and sources referenced by this tool
| Item | Value / Formula | Source |
|---|---|---|
| 40-pin GPIO layout | BCM numbering, 2×20 header | Official Raspberry Pi GPIO documentation / pinout.xyz |
| GPIO logic level | 3.3 V (not 5V tolerant) | BCM SoC datasheet |
Layout from the official documentation, no external API. GPIO is 3.3V logic — never feed in 5V.