NPY / NPZ to CSV Converter

Drop in a NumPy .npy array or .npz archive to see its dtype and shape, preview the values as a table, and export it to CSV.

Drop a .npy or .npz file here, or click to choose
NumPy array files (.npy, .npz) — processed entirely on your device

How this works: this page parses the NPY binary format (and unzips NPZ archives) directly in your browser tab — the file is read with the File API and never uploaded anywhere. dtype, shape, and byte layout (including Fortran-ordered arrays) are read exactly as NumPy wrote them.

Arrays with more than 2 dimensions: the first dimension becomes CSV rows, and every remaining dimension is flattened into columns (labeled by their sub-index, e.g. 0-1-2), so a 3-D or 4-D array still exports as one flat table.

Structured/record dtypes (NumPy arrays with named fields) aren't supported yet — plain numeric, boolean, complex, and string dtypes are.

Troubleshooting

Excel cannot open large .npy array as CSV

A big array (say, a few million cells) can produce a CSV that's slow or unwieldy for a spreadsheet to open. This page warns before building an unusually large export and blocks anything past a hard limit — if you hit that, try exporting a smaller variable or a narrower slice.

dtype shows an error, or "structured/record dtypes are not supported"

NumPy's structured/record dtypes (arrays with multiple named fields per element, like a mini table packed into one array) aren't parsed by this page yet. Plain numeric, boolean, complex, and string dtypes all work.

Prefer the command line?

python -c " import numpy as np a = np.load('file.npy') np.savetxt('file.csv', a, delimiter=',') "

For a .npz archive, load it with np.load('file.npz') and loop over .files to save each array separately.