Why convert HEX to TXT?
The most common reason is tool compatibility: a script or workflow accepts only .txt files, and Intel HEX records are valid plain text under any name. Some users also want to paste or share HEX records in a plain-text context such as a forum post or a code diff. You can learn more about the target format on the .TXT page.
How to convert HEX to TXT
File rename - Windows / macOS / Linux BUILT-IN
Make a copy of your .hex file and rename the extension to .txt; the bytes inside stay identical.
Text editor - Save As FREE
Open the .hex file in Notepad, Notepad++, or TextEdit, then choose File > Save As and type a filename ending in .txt.
Command line - xxd CLI
To dump a raw binary as a readable hex listing, run xxd firmware.bin > output.txt on Linux, macOS, or Git Bash for Windows.
About these formats
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…
Open .HEX details →A TXT file is plain, unformatted text - the simplest document format on any computer. Double-click it: Windows opens it in Notepad, macOS in TextEdit, Linux in gedit. Nothing to install. If…
Open .TXT details →Quality & what to watch
- Intel HEX is already ASCII text - renaming does not alter a single byte inside the file, only which app opens it.
- Do not confuse HEX to TXT with HEX to BIN: if you need a flat binary to flash a chip, use a dedicated tool such as
avr-objcopyor the SRecord toolkit instead. - If your
.hexfile shows binary noise in a text editor, it is a raw binary image with a misnamed extension, not Intel HEX, and cannot be meaningfully read as text.
Frequently asked questions
Does renaming .hex to .txt change the file content?
My .hex file shows gibberish in Notepad - is it not a text file?
.hex extension by mistake and cannot be read as text.Can I read the actual firmware instructions from a .hex file?
.txt shows you the Intel HEX encoding, not disassembled instructions. Reading assembly code requires a disassembler such as avr-objdump - that is a separate process from format conversion.