encode | decode | compress

> motorola | srec | S1 <

// S-Record - Motorola's hex format for embedded systems and microcontrollers

[MOTOROLA]

Industry Standard

Motorola's official format for programming microcontrollers and embedded systems.

[FLEXIBLE]

Address Sizes

Support for 16-bit (S1), 24-bit (S2), and 32-bit (S3) addressing.

[VERIFIED]

Checksum Protection

Each record includes checksum for error detection and data integrity.

>> technical info

How S-Record Works:

S-Record format represents binary data as ASCII hex records. Each line starts with 'S' followed by type, byte count, address, data, and checksum. Different record types support various address widths.

Record Types:

S0: Header record S1: Data (16-bit address) S2: Data (24-bit address) S3: Data (32-bit address) S5: Count record S7/S8/S9: Termination

Why Use S-Record:

  • >Motorola MCU programming
  • >Embedded firmware
  • >PROM programmers
  • >Cross-platform transfer
  • >Debug and verification

>> frequently asked questions

What is S-Record format?

S-Record (SREC) is Motorola's hex file format for conveying binary information as ASCII text. It's widely used for programming microcontrollers and transferring data to embedded systems.

What's the difference between S1, S2, and S3 records?

The main difference is address width: S1 uses 16-bit addresses (up to 64KB), S2 uses 24-bit addresses (up to 16MB), and S3 uses 32-bit addresses (up to 4GB). Choose based on your memory requirements.

How does the checksum work?

The checksum is the one's complement of the sum of all bytes in the record (count, address, and data). It ensures data hasn't been corrupted during transmission or storage.

S-Record vs Intel HEX?

Both are similar text-based formats. S-Record is from Motorola, Intel HEX from Intel. S-Record supports larger addresses natively and has more record types, while Intel HEX is more common in some tools.

Other Languages

S-Record (Motorola HEX) Encoder Decoder — Base64.sh

S-Record (Motorola HEX) Encoder Decoder | SREC Format

Free online S-Record encoder and decoder. Convert binary data to Motorola S-Record format for embedded systems. Support for S1, S2, S3 records with checksums.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Independently inspect record lengths, addresses and payload bytes, check checksums, then verify complete UTF-8 decoding.
Comparison reference
Intel HEX zero-sum and S-record ones-complement checksum rules, with explicit byte assertions.
Verification scope
The listed records and boundaries do not cover every firmware address layout.
Test source and cases (select a file to read it)
  • text-reliability.test.js
    • S-record: S1/S2/S3 payloads preserve UTF-8 bytes with valid record counts and ones-complement checksums

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.