Home/Tools

Data file viewer for TDMS, HDF5, MAT and Parquet

Plot channels from NI TDMS, HDF5, MATLAB .mat (v4 to v7.3), Parquet and CSV files in the browser, read their properties and export channels to CSV.

Drop a data file here

TDMS, HDF5, MATLAB .mat (v4 to v7.3), Parquet, CSV or TSV

The file stays on your computer.

Formats the viewer reads

FormatCommon sourcesWhat you can plot
TDMS (.tdms)LabVIEW, NI-DAQmx logging, npTDMSNumeric, boolean and complex channels in every group, timed from wf_increment; DAQmx raw data with Linear or Polynomial scaling
HDF5 (.h5, .hdf5)h5py, PyTables, MATLAB h5write1-D numeric datasets, columns of 2-D datasets, fields of compound tables
MATLAB .matMATLAB save (v4, v6, v7, v7.3), scipy.io.savematNumeric vectors, matrix columns, fields of 1×1 structs
Parquetpandas, pyarrow, PolarsNumeric and boolean columns, against a timestamp column when there is one
CSV, TSV, TXTSpreadsheets, logger exportsNumeric columns, against the first column when it holds timestamps or increasing values

A TDMS file is a chain of segments. Each segment has a 28-byte lead-in, optional metadata (object paths such as /'Group'/'Channel', properties and raw data indexes) and a block of raw data that can be contiguous or interleaved. Later segments only repeat what changed, so the viewer walks every lead-in, builds the channel list from the metadata, and reads a channel’s bytes when you click it. Timestamps are decoded from the TDMS layout of seconds since 1904-01-01 UTC plus fractions in units of 2⁻⁶⁴ s, and a group’s timestamp channel becomes the time axis for its other channels. You don’t need the .tdms_index file, which only holds a copy of the metadata.

MATLAB’s v7.3 MAT-files are HDF5 files with a 512-byte MATLAB header, so they go through the HDF5 reader. The viewer flips their dimensions back to MATLAB order, which is why a matrix column shows up as M(:,1). Older v4, v6 and v7 files use MATLAB’s own Level 4 and Level 5 formats, and v7 compresses each variable with zlib.

How the viewer reads each format

When you drop a file, the browser hands the page a reference to it. The viewer reads byte ranges with Blob.slice, decodes them in JavaScript or WebAssembly, and draws the result on a canvas.

TDMS metadata is read first and channel data only on demand, so a 200 MB test file with 25 segments listed its channels in about a quarter of a second. HDF5 and v7.3 MAT-files open in h5wasm, the HDF5 C library compiled to WebAssembly, which runs in a background worker and reads through the same file reference without copying the file into memory. Parquet files are read with hyparquet, which takes the schema from the footer and decompresses only the columns you plot (snappy, gzip, zstd, brotli and lz4 are supported). Level 5 MAT-files and CSV files are read into memory whole.

Plotting long channels

A 10-million-sample channel has thousands of times more points than the chart has pixels. For each pixel column the viewer keeps the minimum and maximum sample in that slice of time and draws both, so spikes and dropouts stay visible. Dragging across the chart zooms in and recomputes the envelope from the full-resolution data. Once fewer than about three samples per pixel are visible, every sample is drawn. Double-click to zoom back out. The statistics row (min, max, mean, RMS, sample count, duration) always covers the whole channel, and Export CSV writes every sample of the ticked channels with a time column.

Opening the same files in Python

For scripted analysis, npTDMS reads TDMS files with the same waveform timing and DAQmx scaling:

from nptdms import TdmsFile

tdms = TdmsFile.read("run.tdms")      # TdmsFile.open() streams files larger than RAM
for group in tdms.groups():
    for channel in group.channels():
        print(group.name, channel.name, len(channel), channel.properties.get("unit_string"))
volts = tdms["Analog"]["Voltage"][:]
t = tdms["Analog"]["Voltage"].time_track()   # seconds, from wf_increment

HDF5 with h5py, where slicing a 2-D dataset reads one column without loading the rest:

import h5py

with h5py.File("run.h5", "r") as f:
    f.visit(print)                          # every group and dataset path
    x = f["sensors/accel/x"][:]
    y = f["sensors/accel/xyz"][:, 1]
    print(dict(f["sensors/accel/x"].attrs))

Parquet with pyarrow, reading only the columns you name:

import pyarrow.parquet as pq

print(pq.ParquetFile("run.parquet").schema_arrow)
table = pq.read_table("run.parquet", columns=["time", "a"])
df = table.to_pandas()

MAT-files with SciPy. loadmat reads v4 to v7 files and raises NotImplementedError on v7.3, which h5py opens directly:

from scipy.io import loadmat
import h5py

m = loadmat("run.mat", squeeze_me=True)
sig = m["sig"]

with h5py.File("run_v73.mat", "r") as f:
    M = f["M"][()].T                        # transpose back to MATLAB row/column order

Limits

DAQmx raw TDMS channels that need Thermocouple, RTD, strain, thermistor or table scaling are listed but not plotted yet. npTDMS converts them. HDF5 datasets with more than two dimensions, string and reference datasets, MATLAB cell arrays, struct arrays and sparse matrices are also listed without a plot. Complex data shows the real part. Each plotted channel sits in memory as a typed array, so a 50-million-sample float64 channel takes 400 MB. Level 5 MAT-files over 800 MB and text files over 1.5 GB are refused because they have to be read whole.

If you’re choosing a format for new recordings, the comparison of CSV, MATLAB, TDMS, Parquet and HDF5 covers size, speed and tool support, and opening TDMS files on a Mac walks through desktop and Python options. DAQAtlas, which is in development, exports runs to CSV, MAT, TDMS, Parquet and HDF5, so its recordings open here too. Join the list for early access when DAQAtlas releases.

Questions

Is my file uploaded?

No. The viewer reads the file with the browser’s File API and decodes it in JavaScript and WebAssembly inside the tab. The only network requests are for the viewer’s own code, which loads the first time you open each format.

Can I open a TDMS file on a Mac?

Yes. Drop the .tdms file on the viewer in a current version of Safari, Chrome, Firefox or Edge and its groups, channels and properties appear without LabVIEW or DIAdem. You don’t need the .tdms_index file. For scripted work, the npTDMS Python package reads TDMS on macOS, and the guide to opening TDMS files on a Mac compares the other options.

Does it support DAQmx raw TDMS files?

Partly. NI-DAQmx’s TDMS logging writes raw data with the scaling information stored separately. The viewer applies Linear and Polynomial scales to it, including chains of them combined with Add and Subtract. Channels whose scaling uses Thermocouple, RTD, strain, thermistor or table scales are listed with a note and not plotted yet.

How large a file can it open?

TDMS, HDF5 and Parquet files are read in pieces, so the limit is the channels you plot rather than the file. Each plotted channel is held in memory at 8 bytes per sample for float64. In testing, a 200 MB TDMS file listed its channels in a quarter of a second and plotted its first 6.25-million-sample channel half a second after the file was chosen. Level 5 MAT-files are read whole and capped at 800 MB, and CSV and text files at 1.5 GB.

Which MATLAB .mat versions work?

All of them, from Level 4 files through Level 5 files saved with -v6 or -v7 (including compressed variables) to -v7.3 files, which MATLAB writes in an HDF5-based format. Numeric arrays, logical arrays and fields of 1×1 structs can be plotted. Character arrays and scalars appear as properties, and cell arrays, struct arrays and sparse matrices are listed without a plot.

Why are some channels greyed out?

Greyed-out entries hold data the viewer can show but not plot, such as text channels, timestamp channels, nested Parquet columns or MATLAB cell arrays. Click one to see its properties and, for text and timestamps, its first 50 values. Timestamp channels are used as the time axis for other channels of the same length.