Skip to content
AESTECHNO
Pinout

Arduino pinout: Uno R3, Nano and Mega 2560, pin by pin

The Arduino Uno R3 and Nano break out the same ATmega328P, on four headers for the Uno and two 15-pin rows for the Nano; the Mega 2560 Rev3 keeps the Uno footprint and adds headers for the ATmega2560. Each table gives the Arduino label, the microcontroller port pin and its functions, from the Arduino schematics and Microchip datasheets.

By Hugues Orgitello · Updated ·

Arduino Uno R3: POWER header, 8 pins

Pin numbers from the UNO-TH_Rev3e schematic, order checked against the official pinout. The Mega 2560 Rev3 has exactly the same header.

Arduino Uno, Nano and Mega · Arduino Uno R3: POWER header, 8 pins. Board seen from above, USB and jack at the top. The header runs along the left edge; drawn here horizontally, pin 1 (NC) at the USB end on the left, pin 8 (VIN) on the right..
Board seen from above, USB and jack at the top. The header runs along the left edge; drawn here horizontally, pin 1 (NC) at the USB end on the left, pin 8 (VIN) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 NC NC-- Not connected on the Uno R3 and Mega 2560 (BOOT on the Uno R4) (Not connected)
2 IOREF IOREF-- Tells shields the board logic voltage: tied to +5 V on the schematic (Power)
3 RESET In RESETPC6 / RESET- Active-low reset of the ATmega328P, shared with the reset button and the USB bridge auto-reset (Configuration)
4 3V3 +3V3-- 3.3 V output of the LP2985-33 regulator; 50 mA maximum per the Arduino pinout (Power)
5 5V +5V-- Board 5 V rail: regulator output when powered from VIN or the jack, USB 5 V otherwise (Power)
6 GND GND-- Ground (Ground)
7 GND GND-- Ground (Ground)
8 VIN VIN-- Input of the 5 V regulator; with the jack, carries its voltage after the protection diode. 6 to 20 V per the Arduino pinout (Power)

Arduino Uno R3: analog header A0 to A5, 6 pins

Header AD on the schematic. A0 to A5 are also digital I/O (D14 to D19 in the Arduino core). A4 and A5 carry I2C and are the same nets as the SDA and SCL pins of the digital header: one function at a time.

Arduino Uno, Nano and Mega · Arduino Uno R3: analog header A0 to A5, 6 pins. Board seen from above, USB at the top, below the POWER header on the left edge: pin 1 (A0) on the left, pin 6 (A5) on the right..
Board seen from above, USB at the top, below the POWER header on the left edge: pin 1 (A0) on the left, pin 6 (A5) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 A0 I/O A0 / D14PC0ADC0, PCINT8 Analog input 0, or digital I/O D14 (Signal)
2 A1 I/O A1 / D15PC1ADC1, PCINT9 Analog input 1, or digital I/O D15 (Signal)
3 A2 I/O A2 / D16PC2ADC2, PCINT10 Analog input 2, or digital I/O D16 (Signal)
4 A3 I/O A3 / D17PC3ADC3, PCINT11 Analog input 3, or digital I/O D17 (Signal)
5 A4 I/O A4 / D18PC4ADC4, SDA, PCINT12 Analog input 4, or I2C data (SDA), or digital I/O D18 (Signal)
6 A5 I/O A5 / D19PC5ADC5, SCL, PCINT13 Analog input 5, or I2C clock (SCL), or digital I/O D19 (Signal)

Arduino Uno R3: digital header D8 to D13, SDA, SCL, 10 pins

Header IOH on the schematic. The tilde (~) marks PWM outputs. SDA and SCL (pins 9 and 10) are the same signals as A4 and A5, duplicated on this header.

Arduino Uno, Nano and Mega · Arduino Uno R3: digital header D8 to D13, SDA, SCL, 10 pins. Board seen from above, USB at the top. The header runs along the right edge; drawn here horizontally, pin 10 (SCL) at the USB end on the left, pin 1 (D8) on the right..
Board seen from above, USB at the top. The header runs along the right edge; drawn here horizontally, pin 10 (SCL) at the USB end on the left, pin 1 (D8) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
10 SCL I/O D19/SCLPC5SCL, ADC5 I2C clock; same signal as A5 (Signal)
9 SDA I/O D18/SDAPC4SDA, ADC4 I2C data; same signal as A4 (Signal)
8 AREF In AREFAREF- External ADC reference input, wired to the microcontroller AREF pin and decoupled by 100 nF (C4) on the board (Configuration)
7 GND GND-- Ground (Ground)
6 D13 I/O D13PB5SCK, PCINT5 Digital I/O, SPI clock; also drives the L LED (LED_BUILTIN) through a buffer (Signal)
5 D12 I/O D12PB4MISO (CIPO), PCINT4 Digital I/O, SPI controller data in (Signal)
4 D11 I/O ~D11PB3MOSI (COPI), OC2A (PWM), PCINT3 Digital I/O, PWM, SPI controller data out (Signal)
3 D10 I/O ~D10PB2SS, OC1B (PWM), PCINT2 Digital I/O, PWM, SPI select (SS) (Signal)
2 D9 I/O ~D9PB1OC1A (PWM), PCINT1 Digital I/O, PWM output (analogWrite) on pin D9 (Signal)
1 D8 I/O D8PB0ICP1, CLKO, PCINT0 Digital I/O (Signal)

Arduino Uno R3: digital header D0 to D7, 8 pins

Header IOL on the schematic. D0 and D1 connect through 1 kOhm resistors to the ATmega16U2 USB-to-serial bridge: anything wired to them interferes with uploads and the serial monitor.

Arduino Uno, Nano and Mega · Arduino Uno R3: digital header D0 to D7, 8 pins. Board seen from above, USB at the top, below the IOH header on the right edge: pin 8 (D7) on the left, pin 1 (D0) on the right, away from the USB end..
Board seen from above, USB at the top, below the IOH header on the right edge: pin 8 (D7) on the left, pin 1 (D0) on the right, away from the USB end.
Pin Signal Dir. LabelMCU port pinFunctions Description
8 D7 I/O D7PD7AIN1, PCINT23 Digital I/O (Signal)
7 D6 I/O ~D6PD6OC0A (PWM), AIN0, PCINT22 Digital I/O, PWM output (analogWrite) on pin D6 (Signal)
6 D5 I/O ~D5PD5OC0B (PWM), T1, PCINT21 Digital I/O, PWM output (analogWrite) on pin D5 (Signal)
5 D4 I/O D4PD4T0, XCK, PCINT20 Digital I/O (Signal)
4 D3 I/O ~D3PD3OC2B (PWM), INT1, PCINT19 Digital I/O, PWM, external interrupt INT1 (attachInterrupt 1) (Signal)
3 D2 I/O D2PD2INT0, PCINT18 Digital I/O, external interrupt INT0 (attachInterrupt 0) (Signal)
2 D1 I/O D1/TXPD1TXD, PCINT17 UART transmit (Serial), wired to the USB bridge through 1 kOhm (Signal)
1 D0 I/O D0/RXPD0RXD, PCINT16 UART receive (Serial), wired to the USB bridge through 1 kOhm (Signal)

Main-MCU ICSP 2x3 header (Uno R3, Nano, Mega 2560)

Same order on all three schematics (ICSP, J4, ICSP). The ICSP SPI signals are the same as the header ones: D11 to D13 on Uno and Nano, D50 to D52 on the Mega. A shield taking SPI from the ICSP therefore works on both boards. On the Uno and Mega, the second header ICSP1 programs the ATmega16U2 USB bridge, not the main microcontroller.

Pin Signal Dir. Uno R3 and NanoMega 2560 Description
1 MISO I/O PB4 (D12)PB3 (D50) SPI data to the programmer (CIPO) (Signal)
2 5V +5V+5V Board 5 V rail (Power)
3 SCK I/O PB5 (D13)PB1 (D52) SPI clock (Signal)
4 MOSI I/O PB3 (D11)PB2 (D51) SPI data from the programmer (COPI) (Signal)
5 RESET In PC6 / RESETRESET Microcontroller reset, pulled low while programming (Configuration)
6 GND GNDGND Ground (Ground)

Arduino Nano (ATmega328P): row J2, analog side, 15 pins

Numbers from the NanoV3.3 schematic, order checked against the official pinout. A6 and A7 (ADC6, ADC7) are analog inputs only: the ATmega328P datasheet states they have no digital input buffer.

Arduino Uno, Nano and Mega · Arduino Nano (ATmega328P): row J2, analog side, 15 pins. Board seen from above, USB connector at the top. J2 is the left-hand row, drawn here horizontally: pin 15 (D13) at the USB end on the left, pin 1 (VIN) on the right..
Board seen from above, USB connector at the top. J2 is the left-hand row, drawn here horizontally: pin 15 (D13) at the USB end on the left, pin 1 (VIN) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
15 D13 I/O D13PB5SCK, PCINT5 Digital I/O, SPI clock; also drives the L LED (LED_BUILTIN) through 1 kOhm (Signal)
14 3V3 +3V3-- 3.3 V output (FT232RL 3V3OUT on the schematic); 50 mA maximum per the Arduino pinout (Power)
13 AREF In AREFAREF- External ADC reference input, wired to the microcontroller AREF pin and decoupled by 100 nF (C1) on the board (Configuration)
12 A0 I/O A0 / D14PC0ADC0, PCINT8 Analog input 0, or digital I/O D14 (Signal)
11 A1 I/O A1 / D15PC1ADC1, PCINT9 Analog input 1, or digital I/O D15 (Signal)
10 A2 I/O A2 / D16PC2ADC2, PCINT10 Analog input 2, or digital I/O D16 (Signal)
9 A3 I/O A3 / D17PC3ADC3, PCINT11 Analog input 3, or digital I/O D17 (Signal)
8 A4 I/O A4 / D18PC4ADC4, SDA, PCINT12 Analog input 4, or I2C data (SDA), or digital I/O D18 (Signal)
7 A5 I/O A5 / D19PC5ADC5, SCL, PCINT13 Analog input 5, or I2C clock (SCL), or digital I/O D19 (Signal)
6 A6 In A6ADC6ADC6 (analog only) Analog input only: analogRead works, digitalRead and digitalWrite do not (Signal)
5 A7 In A7ADC7ADC7 (analog only) Analog input only: analogRead works, digitalRead and digitalWrite do not (Signal)
4 5V +5V-- 5 V rail: LM1117 regulator output from VIN, or USB 5 V through a diode (Power)
3 RESET In RESETPC6 / RESET- Active-low reset of the ATmega328P, shared with the reset button and the USB bridge auto-reset (Configuration)
2 GND GND-- Ground (Ground)
1 VIN VIN-- Input of the 5 V regulator; 7 to 12 V per the Arduino pinout (Power)

Arduino Nano (ATmega328P): row J1, digital side, 15 pins

Numbers from the NanoV3.3 schematic. D0 and D1 go through 1 kOhm resistors to the FT232RL USB bridge. Functions match the Uno R3: same microcontroller, same Arduino pin numbers.

Arduino Uno, Nano and Mega · Arduino Nano (ATmega328P): row J1, digital side, 15 pins. Board seen from above, USB connector at the top. J1 is the right-hand row, drawn here horizontally: pin 15 (D12) at the USB end on the left, pin 1 (D1/TX) on the right..
Board seen from above, USB connector at the top. J1 is the right-hand row, drawn here horizontally: pin 15 (D12) at the USB end on the left, pin 1 (D1/TX) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
15 D12 I/O D12PB4MISO (CIPO), PCINT4 Digital I/O, SPI controller data in (Signal)
14 D11 I/O ~D11PB3MOSI (COPI), OC2A (PWM), PCINT3 Digital I/O, PWM, SPI controller data out (Signal)
13 D10 I/O ~D10PB2SS, OC1B (PWM), PCINT2 Digital I/O, PWM, SPI select (SS) (Signal)
12 D9 I/O ~D9PB1OC1A (PWM), PCINT1 Digital I/O, PWM output (analogWrite) on pin D9 (Signal)
11 D8 I/O D8PB0ICP1, CLKO, PCINT0 Digital I/O (Signal)
10 D7 I/O D7PD7AIN1, PCINT23 Digital I/O (Signal)
9 D6 I/O ~D6PD6OC0A (PWM), AIN0, PCINT22 Digital I/O, PWM output (analogWrite) on pin D6 (Signal)
8 D5 I/O ~D5PD5OC0B (PWM), T1, PCINT21 Digital I/O, PWM output (analogWrite) on pin D5 (Signal)
7 D4 I/O D4PD4T0, XCK, PCINT20 Digital I/O (Signal)
6 D3 I/O ~D3PD3OC2B (PWM), INT1, PCINT19 Digital I/O, PWM, external interrupt INT1 (attachInterrupt 1) (Signal)
5 D2 I/O D2PD2INT0, PCINT18 Digital I/O, external interrupt INT0 (attachInterrupt 0) (Signal)
4 GND GND-- Ground (Ground)
3 RESET In RESETPC6 / RESET- Active-low reset of the ATmega328P, shared with the reset button and the USB bridge auto-reset (Configuration)
2 D0 I/O D0/RXPD0RXD, PCINT16 UART receive (Serial), wired to the USB bridge through 1 kOhm (Signal)
1 D1 I/O D1/TXPD1TXD, PCINT17 UART transmit (Serial), wired to the USB bridge through 1 kOhm (Signal)

Arduino Mega 2560 Rev3: POWER header, 8 pins

Same header and same order as the Uno R3 (MEGA2560_Rev3e schematic). The Arduino pinout gives 6 to 20 V on VIN; the user manual recommends 7 to 12 V.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: POWER header, 8 pins. Board seen from above, USB and jack at the top. Left edge, drawn horizontally: pin 1 (NC) at the USB end on the left, pin 8 (VIN) on the right..
Board seen from above, USB and jack at the top. Left edge, drawn horizontally: pin 1 (NC) at the USB end on the left, pin 8 (VIN) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 NC NC-- Not connected on the Uno R3 and Mega 2560 (BOOT on the Uno R4) (Not connected)
2 IOREF IOREF-- Tells shields the board logic voltage: tied to +5 V on the schematic (Power)
3 RESET In RESETRESET- Active-low reset of the ATmega2560, shared with the reset button and the USB bridge auto-reset (Configuration)
4 3V3 +3V3-- 3.3 V output of the LP2985-33 regulator; 50 mA maximum per the Arduino pinout (Power)
5 5V +5V-- Board 5 V rail: regulator output when powered from VIN or the jack, USB 5 V otherwise (Power)
6 GND GND-- Ground (Ground)
7 GND GND-- Ground (Ground)
8 VIN VIN-- Input of the 5 V regulator; with the jack, carries its voltage after the protection diode. 6 to 20 V per the Arduino pinout (Power)

Arduino Mega 2560 Rev3: header A0 to A7, 8 pins

A0 to A7 sit on port F and also work as digital I/O D54 to D61. A4 to A7 also carry the ATmega2560 JTAG (TCK, TMS, TDO, TDI), active only when the JTAGEN fuse is programmed.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: header A0 to A7, 8 pins. Board seen from above, USB at the top, below the POWER header on the left edge: pin 1 (A0) on the left, pin 8 (A7) on the right..
Board seen from above, USB at the top, below the POWER header on the left edge: pin 1 (A0) on the left, pin 8 (A7) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 A0 I/O A0 / D54PF0ADC0 Analog input 0, or digital I/O D54 (Signal)
2 A1 I/O A1 / D55PF1ADC1 Analog input 1, or digital I/O D55 (Signal)
3 A2 I/O A2 / D56PF2ADC2 Analog input 2, or digital I/O D56 (Signal)
4 A3 I/O A3 / D57PF3ADC3 Analog input 3, or digital I/O D57 (Signal)
5 A4 I/O A4 / D58PF4ADC4, TCK Analog input 4, or digital I/O D58 (no I2C here on the Mega) (Signal)
6 A5 I/O A5 / D59PF5ADC5, TMS Analog input 5, or digital I/O D59 (no I2C here on the Mega) (Signal)
7 A6 I/O A6 / D60PF6ADC6, TDO Analog input 6, or digital I/O D60 (Signal)
8 A7 I/O A7 / D61PF7ADC7, TDI Analog input 7, or digital I/O D61 (Signal)

Arduino Mega 2560 Rev3: header A8 to A15, 8 pins

Header ADCH on the schematic, on port K: analog inputs ADC8 to ADC15, also digital I/O D62 to D69 and pin-change interrupts PCINT16 to 23.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: header A8 to A15, 8 pins. Board seen from above, USB at the top, below the A0 to A7 header on the left edge: pin 1 (A8) on the left, pin 8 (A15) on the right..
Board seen from above, USB at the top, below the A0 to A7 header on the left edge: pin 1 (A8) on the left, pin 8 (A15) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 A8 I/O A8 / D62PK0ADC8, PCINT16 Analog input 8, or digital I/O D62 (Signal)
2 A9 I/O A9 / D63PK1ADC9, PCINT17 Analog input 9, or digital I/O D63 (Signal)
3 A10 I/O A10 / D64PK2ADC10, PCINT18 Analog input 10, or digital I/O D64 (Signal)
4 A11 I/O A11 / D65PK3ADC11, PCINT19 Analog input 11, or digital I/O D65 (Signal)
5 A12 I/O A12 / D66PK4ADC12, PCINT20 Analog input 12, or digital I/O D66 (Signal)
6 A13 I/O A13 / D67PK5ADC13, PCINT21 Analog input 13, or digital I/O D67 (Signal)
7 A14 I/O A14 / D68PK6ADC14, PCINT22 Analog input 14, or digital I/O D68 (Signal)
8 A15 I/O A15 / D69PK7ADC15, PCINT23 Analog input 15, or digital I/O D69 (Signal)

Arduino Mega 2560 Rev3: header SCL, SDA, AREF, D13 to D8, 10 pins

Header JP6 on the schematic. Note that its numbering starts at SCL (pin 1), the reverse of the Uno IOH header; the physical positions match the Uno. On the Mega, D10 to D13 do not carry SPI: it sits on D50 to D53 and on the ICSP.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: header SCL, SDA, AREF, D13 to D8, 10 pins. Board seen from above, USB at the top. Right edge, drawn horizontally: pin 1 (SCL) at the USB end on the left, pin 10 (D8) on the right..
Board seen from above, USB at the top. Right edge, drawn horizontally: pin 1 (SCL) at the USB end on the left, pin 10 (D8) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 SCL I/O D21/SCLPD0SCL, INT0 I2C clock; same signal as D21 (Signal)
2 SDA I/O D20/SDAPD1SDA, INT1 I2C data; same signal as D20 (Signal)
3 AREF In AREFAREF- External ADC reference input, wired to the microcontroller AREF pin and decoupled by 100 nF (C3) on the board (Configuration)
4 GND GND-- Ground (Ground)
5 D13 I/O ~D13PB7OC0A / OC1C (PWM), PCINT7 Digital I/O, PWM; also drives the L LED (LED_BUILTIN) (Signal)
6 D12 I/O ~D12PB6OC1B (PWM), PCINT6 Digital I/O, PWM output (analogWrite) on pin D12 (Signal)
7 D11 I/O ~D11PB5OC1A (PWM), PCINT5 Digital I/O, PWM output (analogWrite) on pin D11 (Signal)
8 D10 I/O ~D10PB4OC2A (PWM), PCINT4 Digital I/O, PWM output (analogWrite) on pin D10 (Signal)
9 D9 I/O ~D9PH6OC2B (PWM) Digital I/O, PWM output (analogWrite) on pin D9 (Signal)
10 D8 I/O ~D8PH5OC4C (PWM) Digital I/O, PWM output (analogWrite) on pin D8 (Signal)

Arduino Mega 2560 Rev3: header D7 to D0, 8 pins

The Arduino pinout and schematic mark D0 and D1 as PWM; the ATmega2560 datasheet gives PE0 and PE1 no timer output, and the Arduino core (digitalPinHasPWM) excludes them. The table follows the datasheet. D0 and D1 also go to the ATmega16U2 USB bridge through 1 kOhm.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: header D7 to D0, 8 pins. Board seen from above, USB at the top, below the JP6 header on the right edge: pin 8 (D7) on the left, pin 1 (D0) on the right..
Board seen from above, USB at the top, below the JP6 header on the right edge: pin 8 (D7) on the left, pin 1 (D0) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
8 D7 I/O ~D7PH4OC4B (PWM) Digital I/O, PWM output (analogWrite) on pin D7 (Signal)
7 D6 I/O ~D6PH3OC4A (PWM) Digital I/O, PWM output (analogWrite) on pin D6 (Signal)
6 D5 I/O ~D5PE3OC3A (PWM), AIN1 Digital I/O, PWM output (analogWrite) on pin D5 (Signal)
5 D4 I/O ~D4PG5OC0B (PWM) Digital I/O, PWM output (analogWrite) on pin D4 (Signal)
4 D3 I/O ~D3PE5OC3C (PWM), INT5 Digital I/O, PWM, external interrupt INT5 (attachInterrupt 1) (Signal)
3 D2 I/O ~D2PE4OC3B (PWM), INT4 Digital I/O, PWM, external interrupt INT4 (attachInterrupt 0) (Signal)
2 D1 I/O D1/TX0PE1TXD0, PDO UART0 transmit (Serial), wired to the USB bridge; no PWM per the datasheet (Signal)
1 D0 I/O D0/RX0PE0RXD0, PDI, PCINT8 UART0 receive (Serial), wired to the USB bridge; no PWM per the datasheet (Signal)

Arduino Mega 2560 Rev3: communication header D14 to D21, 8 pins

Three more UARTs (Serial1 to Serial3) and I2C, with four external interrupts. D20 and D21 are the same signals as SDA and SCL on the JP6 header.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: communication header D14 to D21, 8 pins. Board seen from above, USB at the top, below the D7 to D0 header on the right edge: pin 8 (D14) on the left, pin 1 (D21) on the right..
Board seen from above, USB at the top, below the D7 to D0 header on the right edge: pin 8 (D14) on the left, pin 1 (D21) on the right.
Pin Signal Dir. LabelMCU port pinFunctions Description
8 D14 I/O D14/TX3PJ1TXD3, PCINT10 UART3 transmit (Serial3) (Signal)
7 D15 I/O D15/RX3PJ0RXD3, PCINT9 UART3 receive (Serial3) (Signal)
6 D16 I/O D16/TX2PH1TXD2 UART2 transmit (Serial2) (Signal)
5 D17 I/O D17/RX2PH0RXD2 UART2 receive (Serial2) (Signal)
4 D18 I/O D18/TX1PD3TXD1, INT3 UART1 transmit (Serial1), interrupt INT3 (attachInterrupt 5) (Signal)
3 D19 I/O D19/RX1PD2RXD1, INT2 UART1 receive (Serial1), interrupt INT2 (attachInterrupt 4) (Signal)
2 D20 I/O D20/SDAPD1SDA, INT1 I2C data (SDA), interrupt INT1 (attachInterrupt 3) (Signal)
1 D21 I/O D21/SCLPD0SCL, INT0 I2C clock (SCL), interrupt INT0 (attachInterrupt 2) (Signal)

Arduino Mega 2560 Rev3: double-row header D22 to D53 (XIO), 2 x 18 pins

Pad numbers of connector XIO on the schematic (odd: D22 to D52, even: D23 to D53). The XMEM functions (external memory bus) only apply when the memory interface is enabled. SPI sits on D50 to D53, as on the ICSP.

Arduino Uno, Nano and Mega · Arduino Mega 2560 Rev3: double-row header D22 to D53 (XIO), 2 x 18 pins. Board seen from above, USB at the top: the header runs along the edge opposite the USB. Bottom row, on the board edge: odd numbers D23 to D53; top row: D22 to D52. Both 5V pins are on the right (D21 side), both GND pins on the left..
Board seen from above, USB at the top: the header runs along the edge opposite the USB. Bottom row, on the board edge: odd numbers D23 to D53; top row: D22 to D52. Both 5V pins are on the right (D21 side), both GND pins on the left.
Pin Signal Dir. LabelMCU port pinFunctions Description
1 5V +5V-- Board 5 V rail (Power)
2 5V +5V-- Board 5 V rail (Power)
3 D22 I/O D22PA0XMEM AD0 Digital I/O (Signal)
4 D23 I/O D23PA1XMEM AD1 Digital I/O (Signal)
5 D24 I/O D24PA2XMEM AD2 Digital I/O (Signal)
6 D25 I/O D25PA3XMEM AD3 Digital I/O (Signal)
7 D26 I/O D26PA4XMEM AD4 Digital I/O (Signal)
8 D27 I/O D27PA5XMEM AD5 Digital I/O (Signal)
9 D28 I/O D28PA6XMEM AD6 Digital I/O (Signal)
10 D29 I/O D29PA7XMEM AD7 Digital I/O (Signal)
11 D30 I/O D30PC7XMEM A15 Digital I/O (Signal)
12 D31 I/O D31PC6XMEM A14 Digital I/O (Signal)
13 D32 I/O D32PC5XMEM A13 Digital I/O (Signal)
14 D33 I/O D33PC4XMEM A12 Digital I/O (Signal)
15 D34 I/O D34PC3XMEM A11 Digital I/O (Signal)
16 D35 I/O D35PC2XMEM A10 Digital I/O (Signal)
17 D36 I/O D36PC1XMEM A9 Digital I/O (Signal)
18 D37 I/O D37PC0XMEM A8 Digital I/O (Signal)
19 D38 I/O D38PD7T0 Digital I/O (Signal)
20 D39 I/O D39PG2XMEM ALE Digital I/O (Signal)
21 D40 I/O D40PG1XMEM RD Digital I/O (Signal)
22 D41 I/O D41PG0XMEM WR Digital I/O (Signal)
23 D42 I/O D42PL7- Digital I/O (Signal)
24 D43 I/O D43PL6- Digital I/O (Signal)
25 D44 I/O D44~PL5OC5C (PWM) Digital I/O, PWM output (analogWrite) on pin D44 (Signal)
26 D45 I/O ~D45PL4OC5B (PWM) Digital I/O, PWM output (analogWrite) on pin D45 (Signal)
27 D46 I/O D46~PL3OC5A (PWM) Digital I/O, PWM output (analogWrite) on pin D46 (Signal)
28 D47 I/O D47PL2T5 Digital I/O (Signal)
29 D48 I/O D48PL1ICP5 Digital I/O (Signal)
30 D49 I/O D49PL0ICP4 Digital I/O (Signal)
31 D50 I/O D50PB3MISO (CIPO), PCINT3 Digital I/O, SPI controller data in (Signal)
32 D51 I/O D51PB2MOSI (COPI), PCINT2 Digital I/O, SPI controller data out (Signal)
33 D52 I/O D52PB1SCK, PCINT1 Digital I/O, SPI clock (Signal)
34 D53 I/O D53PB0SS, PCINT0 Digital I/O, SPI select (SS) (Signal)
35 GND GND-- Ground (Ground)
36 GND GND-- Ground (Ground)
An interface to design?

An Arduino prototype to turn into a manufacturable board, or a shield to design around an ATmega or another microcontroller? We design the electronics and the firmware.

Uno R4 Minima and WiFi: same positions, different microcontroller

The Arduino manuals for the Uno R4 Minima (ABX00080) and Uno R4 WiFi (ABX00087) list the headers in the same order as the Uno R3, and the Renesas RA4M1 runs at 5 V to stay shield compatible. One position changes: the first pin of the POWER header, unconnected on the R3, becomes BOOT. A4/A5 are still the same pins as SDA/SCL.

What changes electrically: A0 carries a DAC of up to 12 bits, A1 to A3 the internal op-amp (OPAMP+, OPAMP-, output), and pin current drops to 8 mA per pin (60 mA overall per the Minima pinout), against 20 mA on the R3. On the WiFi, the ESP32-S3, its ESP header and the Qwiic connector are 3.3 V.

Nano Every, Nano 33 and Nano ESP32: same footprint, different electrics

The tables above describe the original ATmega328P Nano. Arduino describes the Nano Every (ATmega4809) as 5 V compatible and a drop-in replacement. The Nano 33 IoT and Nano 33 BLE accept 3.3 V only on their I/Os, which are not 5 V tolerant, and their 5V pin supplies nothing until a jumper connects it to USB power.

The Nano ESP32 runs at 3.3 V and has no 5V pin: only VBUS provides 5 V while the board is on USB. On these boards the microcontroller port, PWM and interrupts no longer match the table: use the pinout of the board itself. For the ESP32 itself, see our ESP32 pinout.

Mega 2560: four UARTs and shifted interrupt numbers

The Mega has four UARTs: Serial on D0/D1 (shared with USB), Serial1 on D18/D19, Serial2 on D16/D17, Serial3 on D14/D15. A serial module is best wired to Serial1 to 3 so uploads stay free. The UART rule is unchanged: board TX to module RX.

The six external interrupts do not follow the datasheet INTn numbers: for the Arduino core, D2 is interrupt 0 (INT4), D3 is 1 (INT5), D21 is 2, D20 is 3, D19 is 4 and D18 is 5. Write attachInterrupt(digitalPinToInterrupt(pin), ...) rather than a hard-coded number: the same code then works on Uno, Nano and Mega.

VIN, 5V, 3V3, IOREF and current per pin

The Arduino pinouts for the Uno R3, Nano and Mega give 20 mA maximum per I/O and 50 mA on the 3.3 V pin. The 40 mA in the ATmega328P and ATmega2560 datasheets is an absolute maximum rating, not a design current. Drive a relay or a motor through a transistor, never directly.

VIN feeds the 5 V regulator; the 5V pin ties to the 5 V rail, and feeding 5 V into it bypasses the regulator. IOREF tells shields the logic voltage (5 V on all three boards). Signals stay at 5 V: a 3.3 V sensor on I2C or SPI needs a level shifter.

Frequently asked questions

FAQ

Which Arduino Uno pins support PWM?
On the Uno R3 and Nano, six pins marked with a tilde: D3, D5, D6, D9, D10 and D11, wired to the compare outputs of ATmega328P timers 0, 1 and 2. D5 and D6 share timer 0. On the Mega 2560, the Arduino core accepts analogWrite on D2 to D13 and D44 to D46. The Mega pinout also marks D0 and D1, but the ATmega2560 datasheet gives them no timer output.
Which pins carry I2C and SPI on the Uno, Nano and Mega?
On the Uno R3 and Nano: SDA on A4, SCL on A5 (duplicated next to AREF on the Uno), and SPI on D10 (SS), D11 (MOSI), D12 (MISO) and D13 (SCK). On the Mega 2560: SDA on D20, SCL on D21, and SPI on D50 (MISO), D51 (MOSI), D52 (SCK) and D53 (SS). On all three boards the ICSP header carries the same SPI, which is what shields compatible with both Uno and Mega use.
Can the Nano A6 and A7 pins be used as digital pins?
No. On the ATmega328P Nano, A6 and A7 are the ADC6 and ADC7 inputs of the TQFP package, which the DIP ATmega328P on the Uno does not have. The Microchip datasheet states they have no digital input buffer: analogRead works, digitalRead and digitalWrite do not. To read a button on them, add an external pull resistor and compare the analog value with a threshold.
Is the Uno R4 pin compatible with the Uno R3?
For positions and voltage, yes: the Arduino manuals for the Uno R4 Minima and WiFi give the same header order and 5 V logic, with the POWER header NC pin becoming BOOT. Electrically, no: the RA4M1 limits each I/O to 8 mA against 20 mA on the R3, A0 can become a DAC output, and the AVR registers are gone. A shield fits, but code that writes the ATmega ports directly must be rewritten.
How much current can an Arduino pin supply?
The Arduino pinouts for the Uno R3, Nano and Mega 2560 give 20 mA maximum per I/O pin and 50 mA on the 3.3 V output. The ATmega328P datasheet quotes 40 mA, but as an absolute maximum rating beyond which the chip can be damaged. On the Uno R4, the limit drops to 8 mA per pin. An LED with its resistor is fine; a relay, a motor or an LED strip needs a transistor and a separate supply.
Sources

Tables built from these documents and cross-checked against manufacturer datasheets. Always check the datasheet of the connector you actually use: some manufacturers number differently.

Further reading

Other pinouts