Esp32 Web Updater and SPIFFS file manager

Older versions of the Arduino IDE made it easy to upload files to an ESP32’s SPIFFS storage with the ESP32FS plugin. That plugin no longer worked with the redesigned Arduino IDE 2.x, so a browser-based file manager became a useful way to handle those files.

Difficulty: Intermediate

Created: January 2023

Reviewed: October 2026

Development board: ESP32 Dev Module

The original ESP32 Web Updater and SPIFFS manager lets us manage files and upload application firmware through a browser. In the second half of this tutorial, we move to a separate LittleFS-based version that is a better starting point for a new project. Both examples have been tested on hardware.

ESP32 Web Updater and SPIFFS file manager

Home page of the ESP32 Web Updater and SPIFFS file manager
The original ESP32 Web Updater and SPIFFS manager.

The ESPAsyncWebServer library provides the browser interface. On your local network, open http://<ESP32-IP>/manager or http://esp32-filemanager.local/manager. The host name in config.h controls the latter address. If the .local name does not work on your network, use the IP address shown in the Serial Monitor.

In config.h, enter your Wi-Fi network name and password, then change the manager login. These are the relevant settings in the English ZIP. Do not publish a copy after filling in real credentials.

const char* ssid = "SSID";
const char* password = "password";

const char* http_username = "admin";
const char* http_password = "admin";

const char* host = "esp32-filemanager";

String allowedExtensionsForEdit = "txt, h, htm, html, css, cpp, js";

The manager login does not protect every operation. In the original sketch, /manager, /edit, /save and /delete request authentication. The firmware-update, file-upload and SPIFFS-formatting routes do not have equivalent access checks. Change the default admin/admin login, use this historical example only on a trusted local network, and never expose it directly to the internet.

Settings in the ESP32 SPIFFS file manager config.h file
Wi-Fi, login and other settings in config.h.

From the manager page, we can upload and remove files, edit permitted text files, and create new text files. The allowedExtensionsForEdit setting determines which extensions appear in the editor. The interface also offers a command to format the complete SPIFFS storage.

Editing a text file and adding a new file in the ESP32 SPIFFS manager
Edit a text file or add a new one in the file manager.

The program can also update the ESP32 application firmware over the local network. In the Arduino IDE, compile the sketch and use the command to export the compiled binary. The command’s location depends on the IDE version. Select the resulting application .bin file in the manager’s firmware-update section, then start the update.

Remember: The next firmware you upload must also contain a web updater if you want to update the ESP32 through a browser again. Otherwise this option will no longer be available.

Exporting a compiled application binary from the Arduino IDE
Export the compiled binary from the Arduino IDE.

Depending on the Arduino IDE version and build setup, the exported application binary may appear inside a build/ directory or next to the sketch. Check its filename and choose the application .bin, not a file-system image. When the update completes, the manager displays a result page.

Successful ESP32 firmware update shown in the SPIFFS manager
The browser reports a successful firmware update.

The sketch also contains commented-out LED-blink lines. You can enable them for a simple demonstration that other work in loop() can run alongside the asynchronous web server.

About the original download: This ZIP preserves an older project for historical and educational use. Although it uses Basic authentication on some pages, sensitive operations are not consistently protected. It is not recommended as a production deployment. For a new project, start with the separate LittleFS example below.

The SPIFFS example still helps us understand how a browser-managed ESP32 project was built. The software environment has changed since it was written, though, and its access-control limitations make the newer example a more suitable starting point.

The newer LittleFS version

The v2.0.0 project demonstrates the same two main tasks: managing files through a browser and uploading new application firmware to the ESP32. This time, the files live in LittleFS. The management interface is at /manage/, and files handled by the manager are kept under /files/.

The hardware test used a 4 MB ESP32 Dev Module with Arduino-ESP32 3.3.12, ESPAsyncWebServer 3.12.1 and AsyncTCP 3.5.0.

Download and first setup

Download the LittleFS project here.

After extracting the ZIP, keep config.h and the data/ folder alongside the sketch. The ZIP’s outer folder is named ESP32-web-updater-and-littlefs-filemanager_en, while its sketch is ESP32-web-updater-and-littlefs-filemanager.ino. Before opening it in the Arduino IDE, rename the extracted folder to ESP32-web-updater-and-littlefs-filemanager. This keeps the sketch, its configuration and data/README.txt together.

Enter your Wi-Fi credentials and a new manager password in config.h. The downloaded file contains these exact placeholders:

#pragma once
#define WIFI_SSID "YOUR_WIFI_SSID"
#define WIFI_PASSWORD "YOUR_WIFI_PASSWORD"
#define MANAGER_USER "admin"
#define MANAGER_PASSWORD "CHANGE_THIS_PASSWORD"

Prepare LittleFS for the first time

The management interface HTML is embedded in the sketch. The included data/README.txt is a harmless sample file used to create an initial LittleFS image. The program calls LittleFS.begin(false), so it will not automatically format an unprepared file system. Upload the image built from data/ once before running the sketch on an empty ESP32. You do not need to repeat this every time you upload a sketch.

Only do this for a new or empty file system. Uploading a complete LittleFS image can overwrite files already stored on the partition. If you need to keep existing data, back it up first. Keep the same partition scheme for the file-system image and the sketch.

For Arduino IDE 2, the tested setup used LittleFS Filesystem Uploader 1.6.3. Copy its VSIX file into your system’s .arduinoIDE/plugins/ folder, then restart the IDE. Create the plugins folder if needed. The extension’s installation guide gives the location and steps for each operating system.

Open ESP32-web-updater-and-littlefs-filemanager.ino and confirm that data/README.txt is beside it in the same project folder. Select ESP32 Dev Module, the default partition scheme used for the 4 MB test board, and the correct serial port. Close the Serial Monitor and any other program using that port. Open the Arduino IDE Command Palette with Ctrl+Shift+P (or Cmd+Shift+P on macOS) and run Upload LittleFS to Pico/ESP8266/ESP32. Wait for a successful upload. Then upload the sketch normally, using the same board and partition settings.

Open the Serial Monitor at 115200 baud. If the file system mounts, the program creates /files when needed, connects to Wi-Fi and prints the local addresses. The sample README.txt remains in the file-system root, so it does not appear in the manager’s list of files under /files/.

What happens at startup?

First the ESP32 mounts LittleFS. It then creates /files if necessary and removes a temporary file left by an interrupted upload. After connecting to Wi-Fi, it registers the web routes and starts the server. If LittleFS cannot be mounted, the program reports the problem in the Serial Monitor and does not start the web interface.

if (!LittleFS.begin(false))
{
  Serial.println("LittleFS mount failed; no automatic formatting performed");
  return;
}
if (!LittleFS.exists("/files") && !LittleFS.mkdir("/files"))
{
  Serial.println("Cannot create /files");
  return;
}

The ESP32 prints both addresses to the Serial Monitor. http://<ESP32-IP>/ shows a simple public home page; http://<ESP32-IP>/manage/ opens the login-protected manager. If Wi-Fi does not connect within 20 seconds, the sketch reports a timeout and restarts after five more seconds.

Public home page of the modern ESP32 project with a Management link
The public page links to the separate management interface.
Upper section of the ESP32 LittleFS manager with the file list and text editor
The upper part of /manage/ contains the file list and text editor.

Manage files in the browser

After signing in, choose a file under /files/. Its text loads into the editor. We can change and save it, then reopen it to check the result. We can also upload a new file or delete one we no longer need. The manager refreshes the list after these operations.

Behind the interface, /manage/files returns the list, /manage/file/read reads a text file, and /manage/files/download downloads a file. Writing, uploading and deleting use separate POST routes. The project restricts managed paths to /files/ and applies size limits to file and text operations. Uploading an ordinary LittleFS file is not the same as updating firmware.

Lower section of the ESP32 LittleFS manager with upload, deletion and firmware controls
File upload, deletion and firmware update appear in the lower part of the manager.
A sample text file opened in the ESP32 LittleFS text editor
A saved text file can be opened again from the file list.

Update the firmware from the manager

In the firmware section, select an ESP32 application binary, a .bin file built for your board and partition layout. The sketch writes the new application with the Update library, checks that the transfer completed, sends a response and then restarts the ESP32. Do not disconnect power while the update is in progress.

In the reported hardware test, the ESP32 restarted after the update, the public page and /manage/ worked again, and the sample example.txt remained in LittleFS. This is a test result, not a promise for every partition scheme. Do not change the partition layout without checking what will happen to stored files.

Selecting an ESP32 application firmware binary in the LittleFS manager
Select the application binary in the firmware section.
Browser confirmation before starting the ESP32 firmware update
The browser asks for confirmation before starting the firmware update.

Troubleshooting upload and first startup

Serial port busy or missing: Close the Serial Monitor and other programs using the port. Check the board and port selection. If No port specified, check IDE menus. persists despite the correct selection, restart the Arduino IDE, select the board and port again, and retry. Also check the USB cable and connection if the port still does not appear.

The uploader cannot find data/: After the folder rename, confirm that data/README.txt is inside the same project folder as ESP32-web-updater-and-littlefs-filemanager.ino. Recheck the uploader installation and restart the IDE. Do not copy the manager HTML into data/; this sketch already contains it.

LittleFS mount failed at startup: The normal LittleFS.begin(false) call does not format the partition. For a new, empty board, first verify that the LittleFS image upload succeeded and that both uploads used the same partition scheme. A one-time LittleFS.begin(true) can recover an old or damaged file system, but a failed mount may then trigger formatting and erase stored files. Back up important data before either formatting or uploading a replacement image. Restore false afterward and upload data/ again.

There is an IP address, but the page will not open: Use the address printed in the Serial Monitor and make sure your phone or computer is on the same trusted local network. The public page is at /, the manager at /manage/. The old /manager address belongs to the SPIFFS example.

Saving or uploading is rejected: Check the manager credentials in config.h. In addition to authentication, modifying requests need a matching Origin and CSRF token. Use the /manage/ page for these operations. If an old browser session remains open, reload the manager and sign in again.

Firmware update fails: Select an application-firmware .bin for this ESP32 and partition scheme, not a LittleFS image. Read the browser error and Serial Monitor output. The next firmware must also include a web updater if you want to keep this update method.

Access protection and limits

The newer sketch requires Basic authentication for management GET requests. Modifying POST requests additionally check the request Origin and a CSRF token. The simple public page at / is separate from the protected manager. These checks are more focused than in the old SPIFFS example, but HTTP still does not encrypt credentials or traffic. Use the project on a trusted local network and do not make it directly reachable from the internet.


← Further Arduino tutorials

← More Arduino / ESP Examples and Projects