What is the LIF file format?
A .lif file is a Leica Image File - a proprietary binary container used by Leica Microsystems confocal and fluorescence microscopy software (LAS AF and LAS X) to store multi-dimensional image data. A single .lif file can hold dozens of independent image series from one microscopy session: 2D widefield images, z-stack series, time-lapse sequences, and multi-channel spectral lambda stacks.
The file begins with a one-byte magic value (0x70) followed by a UTF-16 LE XML metadata block (LMSDataContainerHeader) that describes every series - dimensions (X, Y, Z, T, C), physical voxel size in metres, channel labels, objective settings, and timestamps. Raw pixel data follows immediately after the XML block as contiguous blocks for each series, with no padding between them.
Pixel depth ranges from 8-bit to 16-bit per channel, with up to 8 simultaneous channels. File sizes commonly run from tens of megabytes to over 20 GB for large tile scans or extended time-lapse experiments.
The format is supported by the OME Bio-Formats library, making .lif files readable in FIJI (an ImageJ distribution) and OMERO image management servers without Leica software. Leica's newer XML-based formats - .xlif and .lof - address larger datasets and more modular workflows, but .lif remains in wide use for compatibility.
Reading physical pixel size correctly requires the formula physical_size / (num_pixels - 1) per axis; Bio-Formats version 5.9 adopted this corrected calculation.
Security & safety
RISK: LOWPure data file, no executable code. Contains only pixel data and XML metadata. No known malware vectors.
Format details
in a nutshell- CA-Clipper Installer Compressed Archive - Legacy DOS-era installer tool (CA-Clipper) used .lif for its compressed archive format - entirely unrelated to microscopy; db_name references this incorrectly.
Programs that open LIF files
Technical details
deep spec| Magic byte | 0x70 at offset 0; test/memory byte 0x2A at offset 6 |
| Byte order | Little-endian |
| Metadata format | UTF-16 LE XML block (LMSDataContainerHeader) embedded immediately after the binary header; describes all image series, dimensions, physical voxel sizes, channel info, and timestamps |
| Pixel data layout | Raw pixel blocks follow the XML metadata immediately without padding; one contiguous block per image series |
| Typical size | 10 MB - 20 GB (z-stacks, time-lapse, or spectral data can be very large) |
| Bit depth | 8-bit, 12-bit, or 16-bit per channel; up to 8 simultaneous fluorescence and transmitted-light channels |
| Dimensions | X/Y up to tens of thousands of pixels (tile scans); Z: hundreds of slices; T: time-lapse series; C: spectral lambda stacks |
| Compression | None (raw pixel data stored uncompressed) |
| Multi-series support | A single .lif file can contain dozens of independent image series from one microscopy session |
| Physical pixel size formula | physical_size / (num_pixels - 1) per axis; Bio-Formats v5.9+ adopted this corrected formula |
| Third-party support | OME Bio-Formats library (FIJI/ImageJ, OMERO); widely supported in life-science image analysis software |
| Format variants | LIF v1 (original) and LIF v2 (current in LAS X; adds XLIF/LOF support) |
| Released | ~2004 (Leica LAS AF software era) |
| Latest version | LIF format v2 (current in LAS X) |
| Specification | docs.openmicroscopy.org |
LIF conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about LIF files.