I'm often wanting to list what's on a device in terms of partition table. There's a handy utility included with the ESP-IDF, but it's python only and it only accepts files so you have to first call esptool to save your partition table data. I've had to do it so often that I've saved the two commands in another playground note, but not any longer!
The other thing is I swear that there used to be some online place to download your devices flash for backup using web serial, but try as I might I cant find such a place, and my google-fu is usually on point - ignoring my switch to duckduckgo...I digress, introducing my latest possibly needless project, esptool-js "partition edition":
I'm a big fan of the web-serial based ESPTool-JS from Espressif, it allows you to do most things from the browser and not install any dependencies or open a terminal.
Web Serial is amazing!
Anyway, I've always been a bit upset that I couldn't find any way to run the same partition info retrieval via the browser. Today I finally bit the bullet and attempted to use copilot to interrogate the existing python file and produce a typescript port of the code. It didn't run, but after a bit of code wrangling it came together.
Next the reading flash into a blob (binary object in browser-speak) and triggering the download, and finally adding a few finishing touches like logging and getting the downloaded file names correct, and it was good enough for now!
How to use it?
Well, the image above shows after I've clicked the Read Partition Table button. The default partition offset of 0x8000 should be fine for most boards, otherwise try 0x9000, although custom partition table offsets are supported. You won't even see those options until you've clicked Connect and selected your boards serial port.
Once your partition table has loaded it shows the expected information, the bit most people are usually interested in is the first app partition, or ota_0 in this case, and the user file system (user_fs), which is a FAT partition in this screenshot.
The final column in the table has the download button for each partition, clicking it will start reading from the flash memory of the connected device, and once finished will ask the browser to download it. It will be named according to the chip name, partition type, starting offset, and size in bytes, but all the numbers are in hex not decimal.
With these files you can restore this device at any point in the future, by using the top section of the web page labelled Program, or using the python version of esptool like all of the board guides show on the factory reset page.
Now go and freely install something, anything, maybe CircuitPython, or maybe something totally wild, safe in the knowledge that your previous work can be restored. You could even clone a device!
Keywords for future google warriors: esptool.py.exe read partition table gen_esp32part.py
read esp32 partitions, backup esp32s3, esp32s2, esp32c3, esp32c6, esp32h2, esp32p4, esp32c61
This page (ESPTOOL-JS with Partition Table listing + Data saving - Easily backup your device before installing circuitpython/whatever) was last updated on May 16, 2025.
Text editor powered by tinymce.