What is the MF4 file format?
.mf4 is the file extension for ASAM MDF 4 (Measurement Data Format version 4), the automotive industry's open standard for storing time-series measurement data from ECUs, CAN/LIN/Ethernet buses, and sensors. The standard is maintained by ASAM e.V. and was co-developed by Vector Informatik and Robert Bosch GmbH.
Each .mf4 file opens with a 64-byte ID block bearing the ASCII identifier MDF (8 bytes with trailing spaces), followed by a hierarchical linked-list of typed blocks: Header (HD), Data Groups (DG), Channel Groups (CG), Channel definitions (CN), and Data blocks (DT/DZ). Every channel carries its signal name, physical unit, and value conversion formula in the same file, making .mf4 self-describing.
Data compression - DEFLATE, LZ4, or Transpose+DEFLATE - can be applied per data block since MDF 4.1. The format supports attachment blocks for embedding calibration files or images, and a finalization flag marks whether a recording was cleanly closed. Unfinalized recordings begin with the ASCII string UnFinalizedMDF instead of the standard ID block.
.mf4 is used throughout HIL/SIL testing, vehicle data acquisition, and AUTOSAR calibration workflows. Files can reach tens of gigabytes for full test-drive sessions. The open-source Python library asammdf (pip install asammdf) provides fast read/write access; MATLAB, CANape, and CANalyzer are the dominant commercial tools. The predecessor .mdf format (MDF 3.x, from 1991) shares the same file-identifier prefix but uses a different block structure.
Security & safety
RISK: LOWMF4 is a binary data file; not executable. Files may contain proprietary automotive measurement data (vehicle signals, ECU parameters) that is commercially sensitive. Sharing .mf4 files externally may expose confidential calibration or performance data.
Format details
in a nutshellPrograms that open MF4 files
Technical details
deep spec| Standard body | ASAM e.V. (Association for Standardization of Automation and Measuring Systems) |
| File identifier | 8-byte ASCII 'MDF ' (MDF + 5 spaces) at offset 0 of the 64-byte ID block |
| Byte order | Little-endian (default); big-endian allowed by spec but rarely used |
| Block structure | Hierarchical linked-list: ID → HD → DG → CG/CN → DT/DZ blocks via absolute byte-position pointers |
| Compression | Optional DEFLATE (zlib), LZ4, or Transpose+DEFLATE per data block (MDF 4.1+) |
| Typical file size | 1 MB - 10 GB (large ECU/CAN log sessions) |
| Signal metadata | Signal name, physical unit, and value conversion formula stored per channel within the file |
| Version encoding | 4-character ASCII string at ID block offset 8 (e.g., '4.10', '4.20') |
| Bus logging support | CAN, LIN, FlexRay, and Ethernet frame logging (added in MDF 4.1+) |
| Integrity checking | Optional MD5 checksum attachment; finalization flag in MDF 4.1+; unfinalized files start with 'UnFinalizedMDF' |
| Python access | asammdf library (pip install asammdf) - open-source read/write |
| Sample rate | Per-channel metadata; CAN bus typically 1-1 000 Hz, sensor data up to MHz range |
| Operating systems | Windows, Linux |
| Released | 2009 (ASAM MDF 4.0 published as official standard) |
| Latest version | ASAM MDF 4.2.0 (2019); 4.3.0 planned |
| Open standard | Yes · royalty-free |
| Specification | www.asam.net |
MF4 conversions
Community Q&A
asked by usersFrequently asked questions
What is an .mf4 file?
How do I open an .mf4 file for free?
Can MATLAB open .mf4 files?
How do I convert .mf4 to CSV?
from asammdf import MDF; MDF('file.mf4').export('csv'). Or open in CANape and use its export function.