Raspberry Pi B+ GPIO Header Details And Pinout


One of the most significant changes to the Raspberry Pi Model B+ is the 40-pin header (J8). This offers and increase of 14 pins over the 26-pin header on the original Raspberry Pi.

This page aims to provide a set of information that should prove useful to anyone interfacing to these pins in their projects. It also includes a link to a printable PDF worksheet that is useful for making notes as you connect items to your header.


Here is a diagram showing all 40-pins :

Raspberry Pi Model B+ GPIO Header Pin-out


Additional GPIO

The B+ offers 9 extra GPIO pins which can be configured as inputs of outputs. This brings the total number to 26 (17+9).

Ground Pins

The extended header offers an additional 3 ground pins. So that’s a total of 8.


Raspberry Pi Model B+ GPIO Header Pin-outReferring to information on a webpage is great but when you are hardware interfacing it is still useful to be able to scribble on a piece of paper. I’ve created a printable Model B GPIO worksheet so that you can draw and write on the diagram as you build your projects.

It makes it much easier to remember what wires, sensors and components you’ve got connected to each pin.





    En el pinout de la raspbeery pi b+ (27 y 28) se puede colocar un microcontrolador para que pueda leer la eeprom sd o los puertos usb?

  2. I’m trying to address the GPIO in board mode:


    I can't seem to figure out how to address the ports in that mode. I've tried referring to them as they are on the diagram e.g. GPIO4 or P4 or even just "4" and I get errors every time. Any suggestions?


    • BOARD mode means you refer to pins with the pin numbers rather than references. So GPIO4 is Pin 7. In BOARD mode using 4 will be referring to pin 4 which is a 5V power pin.

  3. What do the colours mean? It is clear that Red is 5V, Orange is 3V3, and White is Ground. Put why are GPIO Blue, Green, Purple, and Violet

    • The colours represent groups of pins that can perform special functions. Blue is the SPI interface, Green are general GPIO, purple is the serial interface and violet is the I2C interface.

  4. Jeff Kissinger on

    This pinout doesn’t match my Raspberry Pi 3B. Below is the gpio output from my Pi. Do you know why:

    pi@remotepower:~ $ gpio readall

    [removed output]

    • My diagram is correct. For example if we take physical pin 37 the “gpio” utility labels this as “GPIO.25” when it IS GPIO26. This is probably because of some obscure technical reason which no one cares about. Pin 37 is GPIO26. In the “gpio readall” output the “BCM” column is correct when talking about “GPIO” references. I would ignore the “GPIO.” text in the “Name” column as it won’t help at all.

      A better tool to use on the command line is the official “pinout” command. This will agree with my diagram.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.