MAT file viewer

Open MATLAB .mat files without MATLAB. See every variable – arrays, structs and cells – and download the data as CSV, Excel or JSON.

Runs locally — your files never leave your device

Drop MAT files hereRelease to open

or

.mat v4, v6, v7 and v7.3 · opened on your device, never sent anywhere

No file at hand?

How it works

01

Open .mat files

Drop one or more files on the page, or choose them. v4, v6, v7 and v7.3 are read by your browser and never sent anywhere.

02

See the variables

Each variable is listed with its class, size and the space it takes in the file, like MATLAB’s workspace.

03

Look inside

Arrays open as a table with row and column numbers, even with millions of rows. Step into structs and cells, and pick a page of an N-D array.

04

Download the data

One variable as CSV, or the whole file as Excel, JSON or a ZIP of CSV files. Several files at once as one ZIP.

Export options explained

CSV

One CSV file per variable: Download CSV next to the data for the one you are looking at, or Download all CSV (.zip) for every variable in the file. Values are separated by commas with a point as the decimal mark, in UTF-8. Numbers keep full precision: a double is written with the shortest digits that read back to exactly the same value, a single with 9 significant digits.

Excel (.xlsx)

One sheet per variable, plus an Info sheet with the source file, the MAT version and every variable that was left out, with the reason. Numbers are stored as numbers, so Excel shows them with your own decimal mark. The panel says what will be left out before you download.

JSON

The whole file as one tree that keeps everything CSV and Excel flatten: each value has its MATLAB class and size, structs stay objects, cells stay lists, and N-D arrays are nested lists in MATLAB’s index order: data[i][j][k] is A(i+1, j+1, k+1).

How MATLAB types are written

  • Struct: in CSV and Excel, a header row of field names and one row of values; a struct array has one row per element. Numbers and text are written as values, anything larger as a placeholder such as <double 3x3>. Open the struct here and download the field you need as its own CSV.
  • Cell: one table cell per element, with the same rules as struct fields.
  • N-D arrays: reshaped to rows × all other dimensions in MATLAB’s column order, as reshape(A, size(A,1), []) does. A 10×3×4 array becomes 10 rows and 12 columns.
  • Complex numbers: 3+4i in CSV and Excel (as text in Excel), which MATLAB’s str2double reads back. JSON has separate real and imag lists.
  • int64 and uint64: exact digits in CSV. Excel stores numbers as doubles, which are exact only up to ±253, so larger values are written as text there. JSON writes them as strings.
  • NaN, Inf and -Inf: written as NaN, Inf and -Inf, as MATLAB does (as text in Excel and JSON).
  • Logical: 1 and 0 in CSV and Excel, true and false in JSON.
  • Char: one line of text per row.
  • Sparse: written in full up to 1 000 000 elements; larger matrices as row, col, value (1-based) for each non-zero. JSON always lists the non-zeros.

Excel’s limits

A sheet holds at most 1 048 576 rows and 16 384 columns, and a cell at most 32 767 characters. A variable that does not fit is left out of the workbook, never cut off, and the Info sheet says why. Use CSV or JSON for it instead.

The .mat format

A .mat file is MATLAB’s own binary format for the variables in a workspace, written with save and read with load. There are four versions. v4 holds only 2-D matrices. v6 and v7 (MAT Level 5) add structs, cells and N-D arrays; v7 compresses each variable. v7.3 is an HDF5 file with a MATLAB header and is the only version that can hold variables of 2 GB or more.

The .mat format
Propertyv4v6 / v7v7.3
Saved withsave -v4save -v6, save -v7save -v7.3
MATLAB versionAllv6: MATLAB 5 (R8) and later; v7: MATLAB 7 (R14) and laterMATLAB 7.3 (R2006b) and later
EncodingBinary (MAT Level 4)Binary (MAT Level 5)Binary: HDF5 after a 512-byte MATLAB header
CompressionNov6: no. v7: each variable compressed with zlibYes, HDF5 compression (unless saved with -nocompression)
Structs, cells and N-D arraysNo: 2-D double, char and sparse onlyYesYes
Variables of 2 GB or moreNoNoYes
MIME typeapplication/x-matlab-dataapplication/x-matlab-dataapplication/x-matlab-data
Opened byMATLAB, GNU Octave, Python (scipy.io.loadmat)MATLAB, GNU Octave, Python (scipy.io.loadmat)MATLAB, Python (h5py and other HDF5 tools; not scipy.io.loadmat)
Opens in this viewerYesYesYes
v4
Saved withsave -v4
MATLAB versionAll
EncodingBinary (MAT Level 4)
CompressionNo
Structs, cells and N-D arraysNo: 2-D double, char and sparse only
Variables of 2 GB or moreNo
MIME typeapplication/x-matlab-data
Opened byMATLAB, GNU Octave, Python (scipy.io.loadmat)
Opens in this viewerYes
v6 / v7
Saved withsave -v6, save -v7
MATLAB versionv6: MATLAB 5 (R8) and later; v7: MATLAB 7 (R14) and later
EncodingBinary (MAT Level 5)
Compressionv6: no. v7: each variable compressed with zlib
Structs, cells and N-D arraysYes
Variables of 2 GB or moreNo
MIME typeapplication/x-matlab-data
Opened byMATLAB, GNU Octave, Python (scipy.io.loadmat)
Opens in this viewerYes
v7.3
Saved withsave -v7.3
MATLAB versionMATLAB 7.3 (R2006b) and later
EncodingBinary: HDF5 after a 512-byte MATLAB header
CompressionYes, HDF5 compression (unless saved with -nocompression)
Structs, cells and N-D arraysYes
Variables of 2 GB or moreYes
MIME typeapplication/x-matlab-data
Opened byMATLAB, Python (h5py and other HDF5 tools; not scipy.io.loadmat)
Opens in this viewerYes

FAQ

Can I open a .mat file without MATLAB?

Yes. Drop the file on this page and every variable is listed with its class and size. Click one to see its values, step into structs and cells, and download the data as CSV, Excel or JSON. You need no MATLAB licence, no Octave and no Python.

Which versions are supported? Does v7.3 work?

All four: v4, v6, v7 (compressed) and v7.3. A v7.3 file is an HDF5 file, read with h5wasm, the HDF5 library compiled to WebAssembly. It is about 1 MB and only loads when you open a v7.3 file. The file list shows the version of each file.

Why is a variable marked “not supported yet”?

MATLAB saves string, datetime, duration, table, timetable, categorical, function handles and objects of classdef classes in an internal format that MathWorks does not document. The viewer shows their name, class and size but cannot read the values yet, and leaves them out of CSV and Excel (JSON lists them with a note). To get the data now, convert before saving in MATLAB: char or cellstr for strings, table2struct or table2array for tables, posixtime for datetimes.

Is my data sent anywhere?

No. The file is read by your own browser, in a background thread on your device, and the downloads are made there too. No part of it is sent to a server, so unpublished research data stays on your computer. You can check this in the Network tab of your browser’s developer tools: opening files sends one small request to /api/event, an anonymous count with the tool’s name and the number of files.

How do I open the CSV in Excel with a decimal comma?

The CSV uses commas between values and a point as the decimal mark, so Excel set to a decimal comma (as in most of Europe) reads 1.5 as text or a date when you double-click the file. Use Data → From Text/CSV, choose Comma as the delimiter, then Transform Data and set the columns to Decimal Number with the locale English (United States). Easier: download the Excel file instead. It stores numbers as numbers, and Excel shows them with your own decimal mark.

How large a file can I open?

As large as your device’s memory allows: the file is read into memory in a background thread, so the page stays responsive while it loads, and only the rows on screen are drawn. If a file is too large for the device, the file list says so instead of failing silently. Phones have less memory than computers. Files opened from a link can be up to 150 MB.

Can I open a .mat file from a link?

Yes. Add the file’s address after #src=, for example makerconvert.com/mat-viewer#src=https://github.com/user/repo/blob/main/data.mat. GitHub page links are turned into links to the raw file. The page asks before it loads anything, and then your browser fetches the file directly from that server, not through makerconvert. The server has to allow this (CORS); GitHub does. Only https links are accepted, up to 150 MB.

Send feedback

Only if you want a reply

Your message is sent to us by email. Files are never attached.