Skip to main content

ESP8266 Pinout

ESP8266 (ESP-12E / NodeMCU) · ESP-12E module / NodeMCU dev board

The ESP8266 exposes eleven usable GPIO. Several carry boot-strapping duties, so which pins are safe to use is the thing most people are actually looking up.

Checked against the KiCad library and datasheet on

ESP8266 (ESP-12E / NodeMCU) pinout: KiCad footprint RF_Module:ESP-12E seen from the top, beside the KiCad library symbol RF_Module:ESP-12E with every pin number and name
The bare ESP-12E module as KiCad has it: 22 pads, numbered round the module. The table above uses NodeMCU board labels (D0 to D8); the symbol shows the GPIO number behind each. Exported from the KiCad 9 libraries (RF_Module:ESP-12E, RF_Module:ESP-12E). Open full size

Pin by pin

PinNameFunction
D0GPIO16Wake from deep sleep (wire to RST). No interrupt support; internal pull-down only, no pull-up.
D1GPIO5Safe. Commonly I²C SCL.
D2GPIO4Safe. Commonly I²C SDA.
D3GPIO0Boot-strap: must be HIGH at boot, LOW enters flash mode.
D4GPIO2Boot-strap: must be HIGH at boot. On-board LED.
D5GPIO14Safe. SPI SCLK.
D6GPIO12Safe. SPI MISO.
D7GPIO13Safe. SPI MOSI.
D8GPIO15Boot-strap: must be LOW at boot. SPI CS.
RXGPIO3UART receive — occupied while flashing.
TXGPIO1UART transmit — occupied while flashing.
A0ADC0Single 10-bit ADC, 0–1.0 V on the bare module.

Things that catch people out

  • Safe general-purpose pins: D1, D2, D5, D6, D7.
  • GPIO0, GPIO2 and GPIO15 decide boot mode. A pull-down on GPIO0 stops the chip booting.
  • NodeMCU boards divide A0 to 0–3.3 V; the bare ESP-12E does not.
  • GPIO6 to GPIO11 (the module's CS0, MISO, GPIO9, GPIO10, MOSI and SCLK pads) drive the flash chip. Leave them alone.

Putting the ESP8266 (ESP-12E / NodeMCU) on a PCB

  • On a bare ESP-12E: EN and RST pulled up with 10 kΩ, GPIO15 pulled down with 10 kΩ, GPIO0 and GPIO2 pulled up. Without these the module does not boot.
  • Size the 3.3 V regulator for the Wi-Fi transmit bursts, not the average current: a few hundred mA, with a bulk capacitor at the module's VCC pad.
  • Keep copper, parts and ground pour out from under the PCB antenna at the module's top end, and let that end overhang or sit at the board edge.

Common questions

Which ESP8266 pins are safe to use?
GPIO4, GPIO5, GPIO12, GPIO13 and GPIO14 (D2, D1, D6, D7, D5 on a NodeMCU) have no boot duty and are free for general use.
Why won't my ESP8266 board boot?
Usually a strapping pin in the wrong state at power-up: GPIO15 must be low, GPIO0 and GPIO2 high. A sensor or LED that pulls one of them the wrong way at reset is enough.
What voltage does the ESP8266 A0 pin read?
0 to 1.0 V on the bare chip and ESP-12E module. NodeMCU and Wemos boards add a divider so A0 reads 0 to 3.3 V.

ESP-12E boards most often fail on power and boot pins. Describe yours, then check the generated schematic for the pull-ups on EN, RST and GPIO0 before you route.

Start an ESP8266 board →

Sources

Other pinouts