ESP32 vs ESP8266
The ESP32 does everything the ESP8266 does and more: two Xtensa LX6 cores at up to 240 MHz, 520 KB of SRAM, Wi-Fi plus Bluetooth v4.2 Classic and LE, and 15 ADC pins on the DevKit V1 (ESP32 datasheet v5.3, pp. 3, 4), against one 80 MHz (160 MHz maximum) core, Wi-Fi only and a single 10-bit analog input on the NodeMCU (ESP8266EX datasheet v7.1, pp. 2, 7, 17). Both are 3.3 V boards powered from 5 V USB, so choose the ESP8266 only to reuse existing ESP8266 code or for the simplest Wi-Fi switch or sensor.
Side by side
| ESP32 | ESP8266 | |
|---|---|---|
| CPUEspressif ESP32-WROOM-32 datasheet v3.8, pp. 2, 3; Espressif ESP8266EX datasheet v7.1, pp. 2, 7 | Dual-core Xtensa LX6, up to 240 MHz | Single-core Tensilica L106, 80 MHz (160 MHz maximum) |
| RAMEspressif ESP32 datasheet v5.3, p. 4; ESP8266EX datasheet v7.1, p. 8 | 520 KB SRAM on chip | Under 50 KB free for user code with Wi-Fi connected |
| Flash on the boardESP32-WROOM-32 datasheet v3.8, p. 2; NodeMCU DevKit v1.0 open-hardware design | 4 MB (ESP32-WROOM-32) | 4 MB (ESP-12E) |
| WirelessEspressif ESP32 datasheet v5.3, p. 3; ESP8266EX datasheet v7.1, p. 2 | Wi-Fi 802.11 b/g/n, Bluetooth v4.2 BR/EDR and LE | Wi-Fi 802.11 b/g/n only, no Bluetooth |
| Analog inputsESP32 DevKit V1 pinout; ESP32 datasheet v5.3, p. 4; ESP8266EX datasheet v7.1, p. 17; NodeMCU DevKit v1.0 schematic | 15 ADC pins on the 30-pin board (6 on ADC1, 9 on ADC2), 12-bit | 1 (A0), 10-bit, about 0 to 3.2 V through the board's divider |
| DACEspressif ESP32 datasheet v5.3, p. 4; ESP8266EX datasheet v7.1 | Two 8-bit channels (GPIO25, GPIO26) | None |
| Usable GPIO on the boardESP32 DevKit V1 30-pin pinout; NodeMCU DevKit v1.0 pinout | 25 | 11 |
| Logic levelESP32-WROOM-32 datasheet v3.8, p. 26; ESP8266EX datasheet v7.1, p. 19 | 3.3 V, inputs to VDD + 0.3 V | 3.3 V, inputs to 3.6 V, 12 mA per pin |
| Default I2C pins (Arduino core)arduino-esp32 and ESP8266 Arduino core pin definitions | GPIO21 (SDA), GPIO22 (SCL) | D2 / GPIO4 (SDA), D1 / GPIO5 (SCL) |
Which one to pick
- Any new connected project: two cores, 520 KB of SRAM and Bluetooth beside Wi-Fi (ESP32 datasheet v5.3, pp. 3, 4).
- Several analog sensors, since the DevKit V1 breaks out 15 ADC pins; keep them on ADC1 (GPIO32 to GPIO39) while Wi-Fi is on.
- Bluetooth to a phone or a classic serial link through BluetoothSerial, which needs the original ESP32's Bluetooth Classic.
- Existing ESP8266 projects and firmware such as Tasmota or ESPHome configurations already written for it.
- A simple Wi-Fi relay, switch or single sensor where one analog input and 11 GPIO are enough.
- Projects built around ESP8266 libraries that have no ESP32 port.
Swapping one for the other
What changes in the wiring and the code.
- Both are 3.3 V boards, not 5 V tolerant (ESP32-WROOM-32 datasheet v3.8, p. 26; ESP8266EX datasheet v7.1, p. 19), and both take 5 V on VIN or USB, so level shifting stays as it was.
- Install the esp32 board package by Espressif and select DOIT ESP32 DEVKIT V1 instead of NodeMCU 1.0 (ESP-12E Module).
- Change the Wi-Fi headers: ESP8266WiFi.h becomes WiFi.h, ESP8266WebServer.h becomes WebServer.h and ESP8266mDNS.h becomes ESPmDNS.h.
- Pin names change: the NodeMCU's D1, D2 labels do not exist on the ESP32, so use GPIO numbers. Move I2C from GPIO4/GPIO5 to GPIO21 (SDA) and GPIO22 (SCL), or pass the pins to Wire.begin(sda, scl).
- analogRead() returns 0 to 4095 on the ESP32's 12-bit ADC instead of 0 to 1023 on A0, and has no board divider in front of it, so rescale any conversion.
ESP32 or ESP8266: questions
Is the ESP32 a replacement for the ESP8266?
For new designs, yes: it has two cores at up to 240 MHz, 520 KB of SRAM and Bluetooth v4.2 beside the same 2.4 GHz Wi-Fi (ESP32 datasheet v5.3, pp. 3, 4). Code needs a few changes, mainly the Wi-Fi headers and the pin numbers.
Does the ESP8266 have Bluetooth?
No. The ESP8266EX has 2.4 GHz Wi-Fi only (ESP8266EX datasheet v7.1, p. 2). The ESP32 adds Bluetooth v4.2 Classic and LE (ESP32 datasheet v5.3, p. 3).
How many analog inputs does each board have?
The NodeMCU has one, A0, a 10-bit input that reads about 0 to 3.2 V through the board's 220 kΩ / 100 kΩ divider (ESP8266EX datasheet v7.1, p. 17; NodeMCU DevKit v1.0 schematic). The 30-pin ESP32 DevKit V1 breaks out 15 ADC pins, six of them on ADC1, which stays usable with Wi-Fi on.
Are both boards 5 V tolerant?
No. The ESP32's inputs are limited to VDD + 0.3 V (ESP32-WROOM-32 datasheet v3.8, p. 26) and the ESP8266's to 3.6 V (ESP8266EX datasheet v7.1, p. 19). Use a level shifter or divider on 5 V signals with either.
Will my ESP8266 sketch compile for the ESP32?
Not unchanged. Swap ESP8266WiFi.h for WiFi.h and ESP8266WebServer.h for WebServer.h, replace D-pin labels with GPIO numbers, and rescale analogRead() from 0 to 1023 to 0 to 4095. Most libraries for sensors and displays support both.
The two references
Checked on 2026-10-29 against 4 sources, the makers’ datasheets first.
This comparison as plain Markdown. /compare/esp32-devkit-v1-vs-esp8266-nodemcu.md

