Advances in mass spectrometry imaging that improve both spatial and mass resolution are resulting in increasingly larger data files that are difficult to handle with current software. We have developed a novel near-lossless compression method with data entropy reduction that reduces the file size significantly. The reduction in data size can be set at four different levels (coarse, medium, fine, and superfine) prior to running the data compression. This can be applied to spectra or spectrum-by-spectrum, or it can be applied to transpose arrays or array-by-array, to efficiently read the data without decompressing the whole data set. The results show that a compression ratio of up to 5.9:1 was achieved for data from commercial mass spectrometry software programs and 55:1 for data from our in-house developed msIQuant program. Comparing the average signals from regions of interest, the maximum deviation was 0.2% between compressed and uncompressed data sets with coarse accuracy for the data entropy reduction. In addition, when accessing the compressed data by selecting a random m/ z value using msIQuant, the time to update an image on the computer screen was only slightly increased from 92 (±32) ms (uncompressed) to 114 (±13) ms (compressed). Furthermore, the compressed data can be stored on readily accessible servers for data evaluation without further data reprocessing. We have developed a space efficient, direct access data compression algorithm for mass spectrometry imaging, which can be used for various data-demanding mass spectrometry imaging applications.