uDocumentViewer
Scientific.mat

MAT viewer

ready
About MAT

MATLAB data file — v5 and v7.3.

MAT files come in two incompatible layouts sharing the .mat extension. The 'v5' layout (MATLAB 5 through R2006a, and any `save -v6/-v7` since) is a custom binary format we parse with mat-for-js. The 'v7.3' layout that MATLAB R2006b+ uses for files over 2 GB or to support objects is actually an HDF5 container — we route those through h5wasm. We sniff the magic bytes and pick the right reader automatically. The left panel lists every top-level variable with its type and shape; click one to preview its value as a scalar, string, struct field list, cell list, or matrix (truncated to 50×50). Older v4 files and proprietary vendor variants aren't supported — re-save from MATLAB or Octave with `save('-v7', …)`.

FAQ
Why does my file say 'unknown layout'?
The first 20 bytes didn't match the v5 ASCII signature or the HDF5 magic. Most often this is a MATLAB v4 file (saved before MATLAB 5) or a Level-3-MAT variant. Open the file in MATLAB or Octave and `save('-v7', 'file.mat')` to convert to v5.
Why are big matrices truncated?
We crop previews to the top-left 50×50 block to keep the DOM responsive. The full data is still in your file — to work with it programmatically, use scipy.io.loadmat in Python or load the file in MATLAB / Octave.
Does it handle structs and cell arrays?
Yes. Scalar structs render as a field-name / type table. Cell arrays show their first 20 elements as a list. Non-scalar structs (struct arrays) are converted to cell-like lists per the mat-for-js convention.
Is my .mat uploaded?
No. Both readers (mat-for-js and h5wasm) run entirely in your browser. Nothing leaves your machine.
More Scientific