.UF2

UF2 File

UF2 Firmware File
Ask a question
QUICK ANSWER

A UF2 file is a firmware image in Microsoft's USB Flashing Format, used to program microcontroller boards over USB. You do not open it in an app - you put the board into bootloader mode so it appears as a USB drive, then drag the .uf2 file onto that drive. The board flashes the firmware and reboots. UF2 is the standard way to load code onto boards like the Raspberry Pi Pico, BBC micro:bit, and Adafruit CircuitPython boards.

Developer: Microsoft (MakeCode / PXT) Category: Developer Files Open standard MIME: application/octet-stream
OPENS ON Windows macOS Linux Web
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Jun 19, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the UF2 file format?

UF2 stands for USB Flashing Format, a file format Microsoft created in 2017 for its MakeCode (PXT) platform. It is built to flash microcontrollers over USB Mass Storage: the board shows up as an ordinary removable drive, and you copy firmware to it like any other file. The specification is open and published by Microsoft under an MIT license.

A .uf2 file is a flat sequence of 512-byte blocks. Each block is self-contained - it carries a 32-byte header with magic numbers, the target flash address, the payload length, the block's index and total count, and a family ID that identifies the target chip, followed by up to 476 bytes of firmware and a trailing magic number. That design solves a real problem: an operating system may write the blocks of a copied file in any order, so making each block independent lets the board's bootloader flash data the moment it arrives, without ever seeing a partial file.

Most people meet UF2 when programming a hobbyist or educational board. The Raspberry Pi Pico (RP2040), BBC micro:bit, and many Adafruit, Arduino, and Seeed boards accept UF2, and it is how CircuitPython and MakeCode projects get installed. You usually get a .uf2 by exporting it from an editor such as MakeCode or by downloading a prebuilt firmware for your exact board. Related firmware formats you may see include raw .BIN images and Intel .HEX files.

Security & safety

RISK: MEDIUM

A UF2 file is passive data and cannot run on your PC, but flashing firmware rewrites a board's program memory. Only flash a .uf2 that is built for your exact board, and only from a source you trust, since the wrong or malicious firmware can leave a board unusable until you reflash a known-good image.

Format details

in a nutshell
FULL NAMEUF2 Firmware Fileaka USB Flashing Format, UF2 file
DEVELOPERMicrosoft (MakeCode / PXT)since 2017 (Microsoft MakeCode / PXT)
MIME TYPEapplication/octet-stream
TYPEBinary firmware container designed for flashing microcontrollers over USB Mass Storage
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
5546320A
ASCII
UF2·
First block magic (magicStart0 = 0x0A324655). A second magic 0x9E5D5157 follows at offset 4, and every 512-byte block ends with magicEnd 0x0AB16F30 at offset 508.

Programs that open UF2 files

Windows4 apps
The board's UF2 bootloader (USB drive) Built-in Put the board in bootloader mode so it appears as a USB drive, then drag the .uf2 file onto that drive.
Microsoft MakeCode Free Build a project in MakeCode and use Download to export and flash a .uf2.
uf2conv.py (Microsoft UF2 tools) Open-source Convert firmware with uf2conv.py firmware.bin -o firmware.uf2, or inspect a UF2 with uf2conv.py -i firmware.uf2.
Arduino IDE Open-source Install the board package, then Upload to compile and flash via the UF2 bootloader.
macOS2 apps
The board's UF2 bootloader (USB drive) Built-in Drag the .uf2 file onto the removable drive the board presents in bootloader mode.
Microsoft MakeCode Free Export the project as .uf2 from MakeCode and copy it to the board.
Linux2 apps
The board's UF2 bootloader (USB drive) Built-in Mount the board's USB drive and copy the .uf2 file onto it.
uf2conv.py (Microsoft UF2 tools) Open-source Run python3 uf2conv.py firmware.bin -o firmware.uf2 to build or inspect UF2 files.
Web1 app
Microsoft MakeCode Free Create and download UF2 firmware directly in the browser.

Technical details

deep spec
Encodingbinary
Byte orderlittle-endian (all 32-bit fields)
Containerflat sequence of independent 512-byte blocks
Typical sizea few KB to about 1 MB
StructureA series of 512-byte blocks; each has a 32-byte header (magic numbers, target flash address, payload size, block index and count, family ID), up to 476 bytes of firmware payload, and a trailing magic number
Versioningflags and 32-bit family-ID field identify the target chip (for example RP2040)
Integritythree magic numbers per block (0x0A324655, 0x9E5D5157, 0x0AB16F30) validate each block; no CRC
PlatformsWindows, macOS, Linux, ChromeOS
Initial Release Full2017, with Microsoft MakeCode
NotesYou do not open a UF2 to view it; you copy it onto the board's USB drive to flash firmware. Because each 512-byte block is self-contained, the operating system can write the blocks in any order and the bootloader still flashes correctly.
Released2017 (Microsoft MakeCode / PXT)
Open standardYes · royalty-free
Specificationgithub.com

UF2 conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with UF2 files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about UF2 files.

Frequently asked questions

How do I open a UF2 file?
You do not open it in an app. Put your board in bootloader mode so it appears as a USB drive, then drag the .uf2 file onto that drive. The board flashes it and restarts.
How do I put a Raspberry Pi Pico into bootloader mode?
Hold the BOOTSEL button while plugging the Pico into USB. It mounts as a drive named RPI-RP2; copy the .uf2 onto it and the board reboots running the new firmware.
Can I convert a UF2 file to BIN?
Yes. Microsoft's uf2conv.py extracts the raw binary with uf2conv.py file.uf2 -c -o file.bin. Keep track of the flash address stored in the UF2 header.
Why is my board not accepting the UF2 file?
The file is probably built for a different chip. UF2 blocks carry a family ID, and a bootloader ignores firmware that does not match its board, so download the build made for your exact model.
Is a UF2 file safe?
The file itself cannot run on your computer. The risk is on the hardware side: flashing firmware from an untrusted source, or firmware meant for another board, so only use UF2 files intended for your device.

References

1Microsoft - USB Flashing Format (UF2) specificationmicrosoft.github.io
2microsoft/uf2 on GitHub (spec and uf2conv tool)github.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.CRDOWNLOADChrome Partial Download File
4.MDMarkdown Document
5.RPMSGRestricted Permission Message
6.PARTPartial Download File
7.NOMEDIAAndroid No-Media Marker File
8.DBSQLite Database File
9.EXEWindows Executable (Portable Executable)
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z