There is a new Arduino IDE—Arduino IDE 2. In this tutorial, you’ll learn how to install the ESP32 boards in Arduino IDE 2 and upload code to the board. This tutorial is compatible with Windows, Mac OS X, and Linux operating systems.

According to the Arduino website: “The Arduino IDE 2.0 is an improvement of the classic IDE, with increased performance, improved user interface and many new features, such as autocompletion, a built-in debugger and syncing sketches with Arduino Cloud“.
If you want to install the ESP32 boards on the “classic” Arduino IDE, follow the next tutorial instead: Installing the ESP32 Board in Arduino IDE (Windows, Mac OS X, Linux)
If you prefer programming the ESP32 using VS Code + PlatformIO, go to the following tutorial:
You might also like reading the ESP8266 Guide: Installing ESP8266 NodeMCU Board in Arduino 2 (Windows, Mac OS X, Linux)
Before proceeding make sure you have Arduino IDE 2 installed on your computer.
Go to the Arduino website and download the version for your operating system.


If you have doubts, you can go to the Arduino Installation Guide.
Do you need an ESP32 board? You can buy it here.
Recommended reading: ESP32 Development Boards Review and Comparison
To install the ESP32 board in your Arduino IDE, follow these next instructions.
Open the Boards Manager. You can go to Tools > Board > Boards Manager… or you can simply click the Boards Manager icon in the left-side corner.

Search for ESP32 and press the install button for esp32 by Espressif Systems version 3.X.

That’s it. It should be installed after a few seconds.
To test the ESP32 add-on installation, we’ll upload a simple code that blinks the on-board LED (GPIO 2).
Copy the following code to your Arduino IDE:
/********* Rui Santos Complete project details at https://RandomNerdTutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/ *********/ #include <Arduino.h> #define LED 2 void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(LED, OUTPUT); } void loop() { // put your main code here, to run repeatedly: digitalWrite(LED, HIGH); Serial.println("LED is on"); delay(1000); digitalWrite(LED, LOW); Serial.println("LED is off"); delay(1000); }
Select your board before uploading the code. On the top drop-down menu, click on “Select other board and port…“

A new window, as shown below, will open. Search for your ESP32 board model.
Select the ESP32 board model you’re using, and the COM port. In our example, we’re using the DOIT ESP32 DEVKIT V1. Click OK when you’re done.
Now, you just need to click on the Upload button.
After a few seconds, the upload should be complete.

Note: some ESP32 development boards don’t go into flashing/uploading mode automatically when uploading a new code and you’ll see a lot of dots on the debugging window followed by an error message. If that’s the case, you need to press the ESP32 BOOT button when you start seeing the dots on the debugging window.
The ESP32 on-board LED should be blinking every second.
You can click on the Serial Monitor icon to open the Serial Monitor tab. Make sure you select the 115200 baud rate.

That’s it! You’ve installed the ESP32 Boards successfully in Arduino IDE 2.
1) If you try to upload a new sketch to your ESP32 and you get this error message “A fatal error occurred: Failed to connect to ESP32: Timed out… Connecting…“. It means that your ESP32 is not in flashing/uploading mode.
Having the right board name and COM por selected, follow these steps:
You’ll also have to repeat that button sequence every time you want to upload a new sketch. But if you want to solve this issue once for all without the need to press the BOOT button, follow the suggestions in the next guide:
2) If you get the error “COM Port not found/not available”, you might need to install the CP210x Drivers:
If you experience any problems or issues with your ESP32, take a look at our in-depth ESP32 Troubleshooting Guide.
After installing the ESP32 boards on the Arduino IDE 2, you may also want to install the filesystem uploader plugin to easily upload files to the ESP32 filesystem (LittleFS)—check the following tutorial:
Copyright ©2025. All Rights Reserved Emblab THE RAVE INNOVATION