.HEX

HEX File

Intel HEX File
Ask a question
QUICK ANSWER

A .hex file is an Intel HEX file: compiled firmware for a microcontroller such as an Arduino, AVR, or PIC chip, stored as plain-text records. You don't run it on a PC - you flash it to the device using the Arduino IDE, avrdude, or the vendor's flashing tool. To just read the contents, open it in any text editor and you'll see lines starting with a colon.

Developer: Intel Category: Developer Files Open standard MIME: text/plain
OPENS ON Windows macOS Linux
Related: .DO · .MD · .XSD · .MAP

On this page

19k+ extensions indexed
Last reviewed Aug 30, 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 HEX file format?

Files with the .hex extension use the Intel HEX format - a plain-text, ASCII record format that encodes compiled binary firmware so it can be reliably transferred to a programmer or flashing tool. Rather than storing raw binary data, every byte of content is represented as two hexadecimal characters, which keeps the file fully human-readable in any text editor.

.hex files are always plain text and can be opened with a standard text editor such as Notepad. To flash the firmware to a microcontroller, specialized tools such as avrdude or Arduino IDE are used. Where raw machine code is needed instead, a compiler can also output a binary .bin image, or a Motorola S-record .srec for systems that prefer that format.

A .hex file is the result of a compiler or assembler converting source code into machine code and then encoding it for safe transfer to the target device.

Where .hex files are used

Data contained within .hex files is used to program microcontrollers and to write content into embedded memories such as EEPROM and Flash storage. Microcontrollers are installed in many commonly used devices - from remote controllers and systems controlling a car engine to modern IoT sensors and robotics hardware.

Structure of data in .hex files

Hexadecimal data in a .hex file is stored in lines of text called records, and each record consists of six fields:

  • Start code - a colon (:) that marks the beginning of every record
  • Byte count - two hex digits defining the number of data bytes in that record
  • Address - four hex digits specifying the 16-bit destination address (addressing up to 64 KB per segment in the base format)
  • Record type - two hex digits, from 00 to 05 (for example, 00 = data record, 01 = end-of-file)
  • Data - the actual payload, with each byte encoded as two hexadecimal characters
  • Checksum - two hex digits holding the two's complement checksum of all preceding bytes in the record

The final line of every valid Intel HEX file is the fixed end-of-file record :00000001FF.

Security & safety

RISK: MEDIUM

A .hex file is plain data and cannot run on your PC by itself, so opening one in a text or hex editor is harmless. The real risk is on the device: flashing untrusted firmware can brick hardware or load malicious code onto a microcontroller. Only flash .hex files from the device vendor or a source you trust, and confirm the file matches your exact board/chip before uploading. Editing firmware bytes by hand can also corrupt the image.

Format details

in a nutshell
FULL NAMEIntel HEX File
DEVELOPERIntelsince 1973 (Intel HEX format)
MIME TYPEtext/plain
TYPEPlain-text ASCII record format carrying compiled binary firmware for microcontrollers
STANDARDOpen · royalty-free
This extension is also used by…
  • Generic hex dump - A human-readable transcript of another file's raw bytes (offset + hex + ASCII columns) produced by a hex editor or tools like xxd/hexdump; sometimes raw binary blobs are also loosely saved as .hex.

Programs that open HEX files

Windows4 apps
Notepad Open-source Open the .hex to read the Intel HEX records as text (lines starting with ':').
Arduino IDE Open-source For firmware: Sketch > Upload Using Programmer, or use the bundled avrdude to flash the .hex to a board.
XLoader / avrdude Free Point XLoader (a simple avrdude GUI) at the .hex, pick the board/port, and click Upload to flash.
HxD (hex editor) Free Free Windows hex editor; useful to inspect the raw binary after a HEX→BIN conversion (better than the dead XVI32/FlexHex).
macOS3 apps
TextEdit Built-in Open the .hex as plain text to read Intel HEX records (Format > Make Plain Text).
Arduino IDE Open-source Flash firmware to a connected board using the bundled avrdude tool.
Hex Fiend Open-source Fast, free macOS hex editor; inspect/edit the raw bytes of a converted firmware image (replaces the old paid HexEdit).
Linux2 apps
avrdude Open-source Flash firmware: avrdude -p <mcu> -c <programmer> -U flash:w:firmware.hex
GHex / gedit Open-source GHex inspects/edits raw bytes; gedit (or any editor) opens the Intel HEX records as plain text.

Technical details

deep spec
EncodingPure ASCII text; every data byte is represented as two hexadecimal characters
Record start characterColon `:` (0x3A) - every record line begins with this character; there is no binary magic number
Record typesSix types numbered 00-05: data (00), end-of-file (01), extended segment address (02), start segment address (03), extended linear address (04), start linear address (05)
Base address range16-bit addressing per segment, covering up to 64 KB without address extension records
Extended address rangeUp to 4 GB (32-bit) using type-04 Extended Linear Address records, enabling full 32-bit memory mapping
Max data bytes per recordUp to 255 bytes (0xFF) of data per record; common practice uses 16 or 32 bytes per record
Checksum algorithm8-bit two's complement of all bytes in the record (byte count, address, record type, and data), excluding the start colon
End-of-file markerFixed record `:00000001FF` must terminate every valid Intel HEX file
MIME typetext/plain
Address byte orderBig-endian - most significant byte first in address and multi-byte count fields
Primary useProgramming Flash and EEPROM on microcontrollers such as AVR, PIC, ARM Cortex-M, and 8051 families
Toolchain originOutput of compilers and assemblers including avr-gcc, MPLAB X IDE, Keil MDK, and IAR Embedded Workbench
File size overheadApproximately 1.4-2× the raw binary size, as each byte of data becomes two ASCII characters plus per-record framing bytes
Released1973 (Intel HEX format)
Open standardYes · royalty-free
Specificationen.wikipedia.org

HEX conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with HEX 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 HEX files.

Frequently asked questions

What program opens a .hex file?
To read it, any text editor (Notepad, Notepad++, VS Code) works - Intel HEX is plain text. To flash firmware to a device, use the Arduino IDE, avrdude, or the vendor's flashing tool. To inspect raw bytes after converting, use a hex editor like HxD or Hex Fiend.
Is a .hex file firmware?
Usually yes - the Intel HEX format is compiled firmware for a microcontroller (Arduino/AVR/PIC/ARM), ready to flash. The colon-prefixed record lines are the giveaway.
How do I flash a .hex file to an Arduino?
Use the Arduino IDE (Sketch > Upload Using Programmer) or run avrdude directly: avrdude -p <mcu> -c <programmer> -U flash:w:firmware.hex. Pick the correct board and serial port first.
How do I convert a .hex file to .bin?
Use 'avr-objcopy -I ihex -O binary in.hex out.bin' or the SRecord toolkit. This strips the ASCII framing of Intel HEX to produce the raw firmware image.
Can I open a .hex file in Notepad?
Yes - Intel HEX is text, so you'll see lines of records starting with ':'. Notepad lets you read it but not flash it; for uploading to a device you need the Arduino IDE or avrdude.
Why is my .hex bigger than the firmware?
Intel HEX stores each byte as two ASCII characters plus address and checksum framing, so the text file is roughly 2-3x the size of the raw binary it represents.

References

1Intel HEX format (Wikipedia / spec overview)en.wikipedia.org
2avrdude - firmware programmer documentationgithub.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.MDMarkdown Document
3.CRDOWNLOADChrome Partial Download File
4.BINCD/DVD Disc Image (BIN/CUE)
5.PARTPartial Download File
6.RPMSGRestricted Permission Message
7.NOMEDIAAndroid No-Media Marker File
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.ICSiCalendar data file

Related extensions

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

Free file tools

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

Open the toolbox

Browse file extensions A-Z