🛡️ Secure your IP with 100% Air-Gapped Labs & Signed NDAs
WhatsApp: +86 18928482768 | sales@pcbdesignlab.com

Summary

Intel HEX is a text container for binary payloads where each line carries an address, data, and a checksum. This article explains the HEX format structure, how to read and verify it, and how to convert between HEX, BIN, and other firmware file formats.

Intel HEX is a text container for binary payloads. Each line carries an address, data, and a checksum. That is why it survives email and diff tools better than a raw BIN, and also why a single corrupted character can fail a load.

Opening HEX on Windows is straightforward in any text or hex-aware editor. Trusting it still requires checksum and address awareness. Pair with BIN handling when factories want raw images, and keep both inside the design data package.

HEX Structure in Plain Language

Records start with a colon, then byte count, address, record type, data, and checksum. Data records paint memory. Extended address records move the upper address bits, and an end-of-file record marks completion. Vendor tools may also emit start-segment or start-linear records depending on architecture.

Because addresses live in the file, HEX is harder to flash at the wrong base by accident than a bare BIN. Unless, that is, a tool ignores the address fields or a conversion strips them incorrectly.

How to Open and Review on Windows

  1. Open in a text editor to confirm it looks like colon-prefixed records, not random binary.
  2. Prefer a dedicated HEX/bin utility to validate checksums before production use.
  3. Map address ranges against the MCU memory map from the vendor manual.
  4. Export or convert to BIN only with a logged command line or script checked into the release.

If the file contains sparse regions, a naive conversion can insert huge padding. Know whether your flasher wants sparse HEX or a dense BIN.

Converting HEX to Text or BIN Safely

“Convert to text” sometimes just means viewing records. For audits, exporting a disassembly or string listing can help, but that is analysis, not a manufacturing input. For CM flashes, convert through the same toolchain version every time and store the output hash.

Never hand-edit HEX lines in production paths. A checksum may still pass after a bad edit if you recalculate carelessly, or it may fail mysteriously if you do not.

Where HEX Jobs Break

Mixed line endings from email, truncated downloads, multiple HEX files concatenated in the wrong order, and bootloader-versus-app ranges overlapping. Also common: shipping a debug-build HEX under the same filename pattern as release.

Release Habits

Keep the compiler/linker output, the exact HEX consumed by the fixture, and the board revision together. If a second image programs a co-processor, name the ranges explicitly in the SOP.

Address Records Are Part of the Release

HEX is not just ASCII binary. Segment and linear address records decide where bytes land. Convert formats without preserving address intent and you brick boards in quiet ways.

Keep the toolchain version and conversion command with the release pack, so a later export does not silently shift the map.

Checksum and Span Checks After Convert

After HEX-to-BIN or HEX-to-HEX round trips, compare address span and payload hash against the golden build. Silent truncation is common in email and portal uploads.

Keep the converter command and toolchain version in the release note, so a later export cannot shift the map quietly.

The Email HEX That Lost Its Last Records

A contract manufacturer reported intermittent boots on a new lot. The PCB assembly process had not changed. The programming log showed occasional checksum errors that operators retried until green.

The HEX in the CM inbox was smaller than the golden file in the design archive. A mail gateway had truncated the attachment, and retries sometimes used a cached partial copy.

Distribution moved to a portal with hash verification, and the fixture refused images that did not match the release SHA. Operators stopped retrying bad files into a false pass.

Boot yield returned without a respin. In our notes, HEX is robust on paper and fragile in uncontrolled email paths. Portal plus hash is still how we prefer factory distribution, and that check is how we keep the next package from mixing identities.

Validate Records Before You Trust a Green LED

HEX is structured addressable text, not a prettier bin. Segment and linear address records decide where bytes land, and a truncated email attachment can look almost right while missing the top of memory. Convert with tools that preserve address intent, then compare size, span, and hash against the golden build. Production should reject HEX that fails record checks even if a programmer still blinks friendly lights. Keep the converter command with the release so later exports cannot silently shift the map.

Need Help Aligning HEX/BIN Releases With Hardware?

Share the image set, MCU part numbers, and programming logs. PCBDesign Lab helps tie firmware artifacts to board revisions via reverse engineering and production support alongside PCB design.

Frequently Asked Questions

Is Intel HEX human-readable?

It is ASCII and inspectable, but the data payload is still binary values encoded as hex digits. Use validation tools for checksums rather than visual inspection alone.

How do I convert HEX to BIN?

Use a controlled toolchain or utility, confirm address range and padding behavior, then hash the output. Record the command and tool version in the release notes.

Why does a HEX open fine but fail programming?

Address ranges may fall outside the target, the interface settings may be wrong, or the file may be truncated despite looking plausible at the start.

Can I merge two HEX files?

Only with tools that understand overlapping regions. Blind concatenation is a common way to create silent corruption.

Related Reading

References

  1. IPC – standards overview: https://www.ipc.org/
  2. JEDEC – standards: https://www.jedec.org/
  3. Ucamco – Gerber format: https://www.ucamco.com/en/gerber
  4. Altium documentation: https://www.altium.com/documentation/
  5. Cadence PCB design: https://www.cadence.com/en_US/home/tools/pcb-design-and-analysis.html
  6. Siemens EDA PADS: https://eda.sw.siemens.com/en-US/pcb/pads/
  7. IEEE Standards Association: https://standards.ieee.org/
  8. IEC: https://www.iec.ch/

Get Weekly PCB Engineering Insights!

Practical insights on PCB design, PCB reverse engineering, IC unlocking and hardware development from PCBDesign Lab.

One email each week. Unsubscribe anytime. Read our privacy policy for more info.

Get Started

PCBDesign Lab Has Helped 100+ Customers Build Their Products

Free Consulting