Open MATLAB .mat files without MATLAB. See every variable – arrays, structs and cells – and download the data as CSV, Excel or JSON.
Load file from ?
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?
Drop more MAT files hereRelease to open
.mat v4, v6, v7 and v7.3
Click a file to see its variables.
Opened from a link · fetched directly by your browser from
Variables
Is something not working, or is a format missing? Please tell us!
How it works
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.
See the variables
Each variable is listed with its class, size and the space it takes in the file, like MATLAB’s workspace.
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.
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+4iin CSV and Excel (as text in Excel), which MATLAB’sstr2doublereads 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,Infand-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.
| Property | v4 | v6 / v7 | v7.3 |
|---|---|---|---|
| Saved with | save -v4 | save -v6, save -v7 | save -v7.3 |
| MATLAB version | All | v6: MATLAB 5 (R8) and later; v7: MATLAB 7 (R14) and later | MATLAB 7.3 (R2006b) and later |
| Encoding | Binary (MAT Level 4) | Binary (MAT Level 5) | Binary: HDF5 after a 512-byte MATLAB header |
| Compression | No | v6: no. v7: each variable compressed with zlib | Yes, HDF5 compression (unless saved with -nocompression) |
| Structs, cells and N-D arrays | No: 2-D double, char and sparse only | Yes | Yes |
| Variables of 2 GB or more | No | No | Yes |
| MIME type | application/x-matlab-data | application/x-matlab-data | application/x-matlab-data |
| Opened by | MATLAB, 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 viewer | Yes | Yes | Yes |
| Saved with | save -v4 |
|---|---|
| MATLAB version | All |
| Encoding | Binary (MAT Level 4) |
| Compression | No |
| Structs, cells and N-D arrays | No: 2-D double, char and sparse only |
| Variables of 2 GB or more | No |
| MIME type | application/x-matlab-data |
| Opened by | MATLAB, GNU Octave, Python (scipy.io.loadmat) |
| Opens in this viewer | Yes |
| Saved with | save -v6, save -v7 |
|---|---|
| MATLAB version | v6: MATLAB 5 (R8) and later; v7: MATLAB 7 (R14) and later |
| Encoding | Binary (MAT Level 5) |
| Compression | v6: no. v7: each variable compressed with zlib |
| Structs, cells and N-D arrays | Yes |
| Variables of 2 GB or more | No |
| MIME type | application/x-matlab-data |
| Opened by | MATLAB, GNU Octave, Python (scipy.io.loadmat) |
| Opens in this viewer | Yes |
| Saved with | save -v7.3 |
|---|---|
| MATLAB version | MATLAB 7.3 (R2006b) and later |
| Encoding | Binary: HDF5 after a 512-byte MATLAB header |
| Compression | Yes, HDF5 compression (unless saved with -nocompression) |
| Structs, cells and N-D arrays | Yes |
| Variables of 2 GB or more | Yes |
| MIME type | application/x-matlab-data |
| Opened by | MATLAB, Python (h5py and other HDF5 tools; not scipy.io.loadmat) |
| Opens in this viewer | Yes |
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.