↔

PRIVATE BROWSER TOOL

Extract an address range from Intel HEX

Use address-range extraction to separate a bootloader, application or calibration block from a combined firmware image.

01

Inputs

● Local processing — this file never leaves your browser.
02

Results

↔

Run the tool to see a structured report here.

ON THIS DEVICE

Recent history

Your latest 10 runs will appear here on this device.

HOW IT WORKS

Method and formulas

Only mapped bytes with start ≤ address < end are retained. New type 04 and type 00 records are emitted in ascending order with an EOF record.

Accuracy note

Always compare generated firmware with the target device’s memory map, linker output and programming documentation before flashing.

GUIDE

What This Tool Does and When to Use It

The Extract an address range from Intel HEX tool isolates a contiguous block of firmware bytes from an Intel HEX image according to absolute start and end addresses supplied by the user. It retains only data records whose addresses fall inside the closed-open interval start ≤ address < end, discards all other mapped bytes, and then emits a fresh, correctly ordered Intel HEX file containing the required type-04 extended linear address records followed by type-00 data records and a terminating type-01 EOF record. Engineers employ this utility when they must carve a bootloader, application partition, calibration table, or security region out of a monolithic firmware image without manually editing hex records or risking checksum errors. Because the operation occurs entirely inside the browser, no firmware bytes ever leave the local machine, satisfying air-gapped or regulatory requirements common in automotive, medical, and aerospace development workflows.

Intel HEX files encode 16-bit or 32-bit addresses through a combination of type-00 data records and type-04 extended linear address records. The splitter parses every record, reconstructs the full 32-bit linear address for each byte, applies the user-supplied range filter, and then rebuilds the minimal set of new records needed to represent the surviving bytes. The resulting file remains fully compliant with the Intel HEX specification and loads without modification into any standard programmer or debugger.

Worked Example with Realistic Numbers

Consider a 64 KiB firmware image whose first 4 KiB contain a bootloader and whose next 8 KiB contain an application. The original file begins with a type-04 record setting the upper 16 bits to 0x0000, followed by type-00 records covering addresses 0x0000–0xFFFF. To extract only the application, the user enters start address 0x1000 and end address 0x3000. The tool discards the 4096 bytes below 0x1000 and the 53248 bytes above 0x2FFF, retaining exactly 8192 bytes. It emits one type-04 record for segment 0x0000, then a sequence of type-00 records beginning at offset 0x1000 and ending at offset 0x2FFF, followed by the EOF record. The output file size is therefore smaller and contains only the requested application image.

Original AddressByte ValueRetained?
0x0FF00xE0No
0x10000x12Yes
0x20000x34Yes
0x2FFF0x56Yes
0x30000x78No

Formula and Method Table

InputFormatUnitOutput
Start addressHexadecimal32-bit linearFirst retained byte offset
End addressHexadecimal32-bit linearFirst excluded byte offset
Input HEX recordsStandard IntelBytesFiltered data bytes
Resulting fileRe-generated Intel HEXRecordsType 04 + 00 + 01 only

Units and Conversions Notes

All addresses are interpreted as 32-bit linear values after type-04 record expansion. Users may enter addresses in either uppercase or lowercase hexadecimal; the tool normalizes them internally. Byte counts are always decimal in status messages, while record offsets remain hexadecimal to match common debugger displays. No floating-point or scaled units appear; the domain operates exclusively on byte-granular memory images. When the supplied end address exceeds the highest address present in the input file, the tool simply stops at the last mapped byte without padding or error.

Limitations

The splitter ignores type-02 and type-05 records because they represent segmented addressing rarely used in modern 32-bit firmware. It does not support type-03 start-segment-address records. If the requested range contains no mapped bytes, an empty file containing only the EOF record is produced. Maximum input file size is limited by browser memory, typically a few tens of megabytes. The algorithm assumes well-formed input; malformed checksums cause immediate rejection before any splitting occurs. Extended addresses above 0xFFFFFFFF are not representable and will be rejected at parse time.

Common Mistakes

Users frequently enter an end address that is inclusive rather than exclusive, inadvertently dropping the final byte of the desired region. Another frequent error is supplying a start address larger than the end address, which the tool rejects with a clear validation message. Some engineers forget that type-04 records must be regenerated; attempting to reuse the original high-address records after filtering produces invalid images. Finally, omitting the leading “0x” prefix is harmless because the parser accepts bare hexadecimal digits, yet copying addresses from datasheets that use “h” suffixes can introduce parse failures if the suffix is not stripped first.

LONG-FORM ANSWERS

Frequently asked questions

How are type-04 records regenerated when the retained range crosses a 64 KiB boundary?

The splitter calculates the required upper 16 address bits for each retained byte group and emits a fresh type-04 record only when the segment changes, guaranteeing ascending order and minimal record count.

What happens to data bytes whose 32-bit address equals the supplied end value?

Bytes at the exact end address are excluded because the interval is closed at start and open at end, matching the documented methodology of start ≤ address &lt; end.

Does the tool preserve original record lengths or always emit 16-byte data records?

It emits the shortest valid sequence of 16-byte and shorter records needed to represent the retained bytes, never exceeding the original record length constraints of the Intel HEX specification.

Can the extracted range include addresses above 0xFFFF without a preceding type-04 record in the output?

No, a type-04 record is always emitted first when the retained data lies above the 64 KiB boundary to set the correct linear base address.

How does the tool behave if the input file contains overlapping address ranges from multiple type-04 segments?

Overlapping addresses are treated as the last-written value during parsing; only the final mapped byte at each address participates in the range filter.

What validation is performed on the start and end address fields before processing begins?

Both values are parsed as 32-bit hexadecimal integers; the tool rejects cases where start exceeds end or either value exceeds 0xFFFFFFFF.

Are checksums recalculated for every regenerated record in the output file?

Yes, each new type-00 and type-04 record receives a freshly computed two’s-complement checksum matching the Intel HEX specification exactly.

What occurs when the requested range lies entirely outside any mapped bytes in the source image?

An output file containing only the mandatory type-01 EOF record is generated, resulting in a valid but empty Intel HEX image.