Why the Comparison Matters
When Espressif launched the ESP8266 in 2014 it quietly revolutionised the hobbyist internet-of-things space. For the first time a Wi-Fi capable microcontroller could be purchased for less than two US dollars, and the Arduino IDE made it accessible to anyone who could write a blink sketch. By 2016 the follow-up ESP32 arrived with a dual-core processor, integrated Bluetooth, and a dramatically expanded peripheral set. Today both chips remain in active production and both appear on the shelves of every electronics supplier in the world — so the question “which one should I use?” is entirely valid, and the answer depends on your project requirements.
This guide walks through every meaningful dimension of the comparison: processor architecture, memory, connectivity, GPIO count and capabilities, power consumption, toolchain maturity, and real-world cost. By the end you will have a clear mental framework for choosing the right chip on the first attempt, rather than discovering mid-project that you need to swap hardware.
Architecture and Processing Power
The ESP8266 is built around a single Tensilica L106 core running at 80 MHz by default and overclockable to 160 MHz. This is a 32-bit RISC core that handles Wi-Fi stack processing alongside your application code. When the radio fires up — which happens frequently during Wi-Fi operations — the core is partially occupied by the network stack, leaving less headroom for user code. This is why heavy computation such as JPEG encoding or sensor fusion can cause the ESP8266 to miss network packets or watchdog-reset.
The ESP32 pairs two Xtensa LX6 cores at up to 240 MHz. Core 0 (called “PRO_CPU”) handles the Wi-Fi and Bluetooth stack by default; Core 1 (“APP_CPU”) runs your Arduino sketch. This separation means your application logic receives a dedicated processor and is not interrupted by radio housekeeping. On FreeRTOS you can explicitly pin tasks to either core, schedule them with priorities, and use inter-core messaging queues. The result is a platform that can comfortably run real-time sensor acquisition on one core while streaming data over Wi-Fi on the other.
The ULP (Ultra Low Power) co-processor is a third, often overlooked compute element on the ESP32. It is a simple 8 MHz RISC core that runs while the main cores are asleep, capable of reading ADC values, toggling GPIO, and waking the main CPU when a threshold is crossed. There is no ULP equivalent on the ESP8266.
Memory: Flash, RAM, and Heap
Memory is where the ESP8266 feels most constrained in modern projects. The chip itself has no embedded flash; it relies entirely on an external SPI flash chip, typically 4 MB on NodeMCU and Wemos D1 Mini boards. Its SRAM is 160 KB total, of which approximately 80 KB is available to user code as heap once the Wi-Fi libraries are loaded. That 80 KB goes quickly when you start using JSON parsing libraries, TLS buffers for HTTPS connections, or web server frameworks.
The ESP32 has 520 KB of internal SRAM, with around 300–330 KB accessible as heap in a typical Arduino build. Many popular ESP32 modules (WROOM-32, WROVER) also include external PSRAM — 4 MB or 8 MB of pseudo-static RAM accessible via the SPI bus — which expands effective RAM into the megabytes at the cost of slightly lower access speed. This is enough headroom to decode JPEG thumbnails, run a small language model inference, or hold a full HTTP response body without gymnastics.
Flash storage defaults to 4 MB on most modules. The ESP32 supports flash sizes up to 16 MB depending on the module variant, and its flash partitioning system allows OTA update partitions, SPIFFS or LittleFS file-system partitions, and NVS (non-volatile storage) key-value partitions to coexist cleanly.
GPIO Count and Peripheral Multiplexing
The ESP8266 exposes 17 GPIO pins on the chip, though usable GPIOs on a NodeMCU board number around 11 once you exclude pins used for boot strapping, UART programming, and flash SPI. All GPIO are 3.3 V only and must not be driven above that voltage. One single-ended ADC pin is available, measuring 0–1 V (the NodeMCU voltage divider stretches this to 0–3.3 V externally). There is one hardware UART for programming and a second UART that can be mapped to alternate pins. I²C and SPI are bit-banged or hardware-assisted on fixed pins.
The ESP32 offers up to 34 GPIO pins, of which 18 can be configured as ADC inputs, 2 as true 8-bit DAC outputs, and many as capacitive touch sensors. Unlike the ESP8266, the ESP32 has a GPIO matrix that allows almost any peripheral function (UART, SPI, I²C, PWM, etc.) to be routed to almost any GPIO pin. This flexibility eliminates the rigid pin-mapping constraints that ESP8266 developers frequently encounter. The ESP32 also exposes four hardware SPI controllers, two I²C controllers, and two I²S interfaces for audio, which the ESP8266 lacks entirely.
Connectivity: Wi-Fi, Bluetooth, and More
Both chips support 802.11 b/g/n Wi-Fi on the 2.4 GHz band. They can operate as a Wi-Fi station (connecting to a router), as a software access point, or simultaneously in station+AP mode. Range and throughput are broadly similar because both use the same RF front-end design philosophies and typically achieve 50–100 Mbps theoretical peak (though real-world throughput through the Arduino API is far lower due to TCP/HTTP overhead).
The ESP32 adds Classic Bluetooth 4.2 (BR/EDR) for audio and SPP serial profiles, plus Bluetooth Low Energy (BLE) for sensor beacons, GATT services, and mesh networking. This is a genuine hardware addition, not an emulation — the same radio module that handles Wi-Fi switches to the Bluetooth band without an external antenna in dual-radio configurations. Classic BT and BLE can run concurrently. The ESP8266 has no Bluetooth capability whatsoever.
Some ESP32 variants extend connectivity further: the ESP32-C6 adds IEEE 802.15.4 (Thread and Zigbee), and the ESP32-H2 is purpose-built for Thread and Zigbee mesh networks. These are separate chip families rather than the base ESP32, but they demonstrate the ecosystem breadth that Espressif has built on top of the original design.
Power Consumption Modes
The ESP8266 active current draw hovers between 60 mA and 170 mA depending on transmit power. Modem-sleep mode (Wi-Fi radio off between DTIM beacon intervals) reduces average draw to 15–20 mA. Deep sleep — where most of the chip is powered down — reaches approximately 20 µA, with wake-up requiring an external reset signal on the RST pin connected to GPIO16.
The ESP32 active current is similar at 80–240 mA depending on both cores running and Wi-Fi transmitting. Its deep sleep current is around 10–50 µA depending on whether ULP is active. Light sleep suspends the CPU clocks while keeping SRAM contents alive and the Wi-Fi association intact — a mode the ESP8266 does not implement cleanly. The ULP co-processor adds a unique power tier: it reads sensors at microamp-level current while main cores hibernate, waking the system only when data crosses a threshold.
Comparison Table
| Feature | ESP8266 | ESP32 |
|---|---|---|
| CPU Cores | 1 × Tensilica L106 | 2 × Xtensa LX6 |
| Max Clock | 160 MHz | 240 MHz |
| SRAM | ~80 KB usable | ~300 KB usable + optional PSRAM |
| GPIO | 11 usable (NodeMCU) | Up to 34 |
| ADC | 1 channel, 10-bit | 18 channels, 12-bit |
| DAC | None | 2 × 8-bit |
| Wi-Fi | 802.11 b/g/n 2.4 GHz | 802.11 b/g/n 2.4 GHz |
| Bluetooth | None | BT Classic + BLE 4.2 |
| Touch Pins | None | 10 |
| Deep Sleep µA | ~20 µA | ~10 µA |
| I²S Audio | None | 2 controllers |
| Typical Board Price | $2–4 | $4–8 |
Toolchain, Libraries, and Community
The ESP8266 Arduino core has been in active use since 2015 and has accumulated a decade of tutorials, forum posts, and library ports. If you encounter a problem there is almost certainly a Stack Overflow thread about it. The core is stable and bug-fix focused; do not expect new features.
The ESP32 Arduino core is newer but equally mature by now. Espressif maintains it directly and ships regular updates aligned with their IDF (IoT Development Framework) releases. Library support is excellent — every major sensor library that supports ESP8266 has an ESP32 variant. Additionally, for advanced users, the ESP-IDF (FreeRTOS-based native SDK) offers direct access to the dual-core RTOS, power management APIs, and hardware security features unavailable through Arduino abstractions.
When to Choose ESP8266
Choose the ESP8266 when your project demands the lowest component cost, requires nothing more than Wi-Fi connectivity, uses only one or two sensors, and can be powered from mains or a large battery. Classic use cases are smart plugs, temperature loggers that POST to a server every few minutes, simple web-controlled relays, and anything where you are shipping hardware at volume and every cent counts. The ESP8266 is also ideal when you are migrating an existing project that already has tested ESP8266 firmware and you do not need any new peripheral capabilities.
When to Choose ESP32
Choose the ESP32 for virtually every new project that does not have aggressive cost constraints. The $2–4 price premium buys dual-core processing headroom, Bluetooth, more GPIO, better ADC, DAC outputs, touch sensing, and expanded sleep modes. Real-time audio, camera projects (with ESP32-CAM), TLS-secured HTTPS, BLE advertising, OTA updates with dual-partition fallback, and any task that benefits from FreeRTOS task pinning all belong in ESP32 territory. It is the safer long-term bet because the chip family is still receiving new silicon variants from Espressif, whereas the ESP8266 is architecturally frozen.
Migration Tips
If you are porting an existing ESP8266 project to ESP32, start by replacing the library includes: ESP8266WiFi.h becomes WiFi.h, ESP8266WebServer.h becomes WebServer.h, ESP8266HTTPClient.h becomes HTTPClient.h. Most application logic transfers verbatim. Check your pin assignments — D0 through D8 map differently between boards, so use numeric GPIO numbers rather than D-prefixed aliases. analogRead(A0) on the ESP8266 returns 0–1023 for 0–1 V; on the ESP32 it returns 0–4095 for 0–3.3 V. Adjust any threshold comparisons accordingly.
If your ESP8266 project uses deep sleep, note that on ESP32 you call esp_sleep_enable_timer_wakeup(microseconds) before esp_deep_sleep_start() — there is no separate GPIO16-to-RST wiring required. The ESP32 wakes from its own internal RTC timer.
Finally, check your power supply. ESP32 boards draw more peak current (up to 500 mA during Wi-Fi transmit bursts) and are less tolerant of weak 3.3 V regulators on breadboard power rails. A quality AMS1117-3.3 or LDO with at least 600 mA capacity and 100 µF decoupling keeps the chip stable.
Conclusion
The ESP8266 is a proven, inexpensive chip that solves simple Wi-Fi tasks elegantly. The ESP32 is everything the ESP8266 is, plus dual cores, Bluetooth, more peripherals, and a richer power management story. For new designs in 2024 and beyond, start with the ESP32 — the modest price increase is almost always justified by the capabilities you gain. Reserve the ESP8266 for cost-sensitive volume builds where you need nothing beyond basic Wi-Fi and have an existing codebase to maintain.