> ## Documentation Index
> Fetch the complete documentation index at: https://docs.biom.science/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported File Formats

> All file formats Relay can open, view, and process.

# Supported File Formats

Relay supports over 30 file formats across scientific imaging, medical imaging, electrophysiology, video, tabular data, and standard images.

<Info>
  **No server-side rendering required.** Unlike most web-based viewers, Relay decodes and renders scientific images entirely in the browser using WebAssembly. TIFF, CZI, ND2, LIF, and most other microscopy formats open directly — no BioFormats server, no conversion step, no waiting. This covers 95%+ of scientific image file types.
</Info>

## Scientific image formats

| Format       | Extensions                               | Viewer       | Notes                                                                                         |
| ------------ | ---------------------------------------- | ------------ | --------------------------------------------------------------------------------------------- |
| **OME-TIFF** | `.ome.tif`, `.ome.tiff`, `.tif`, `.tiff` | Viv/deck.gl  | Multi-channel, Z-stacks, time-series. Tile-based streaming for large files. OME-XML metadata. |
| **OME-Zarr** | `.zarr`                                  | Viv/deck.gl  | Cloud-optimized chunked arrays. Served via presigned URLs or proxy.                           |
| **CZI**      | `.czi`                                   | Viv/deck.gl  | Zeiss microscopy format. Decoded client-side via WebAssembly.                                 |
| **ND2**      | `.nd2`                                   | Viv/deck.gl  | Nikon microscopy format. Decoded client-side via WebAssembly.                                 |
| **LIF**      | `.lif`                                   | Viv/deck.gl  | Leica microscopy format. Decoded client-side via WebAssembly.                                 |
| **DICOM**    | `.dcm`, `.dicom`                         | DICOM Viewer | Medical imaging with window/level presets and series management.                              |
| **FITS**     | `.fits`, `.fit`                          | Image Viewer | Astronomical images. Input for SExtractor model.                                              |

## Neuroscience formats

| Format          | Extensions             | Viewer       | Notes                                                                   |
| --------------- | ---------------------- | ------------ | ----------------------------------------------------------------------- |
| **NWB**         | `.nwb`                 | Spike Viewer | Neurodata Without Borders. HTTP range streaming, 6-hour signed URL TTL. |
| **HDF5**        | `.h5`, `.hdf5`         | Data Viewer  | Hierarchical data. Suite2p and SpikeInterface input.                    |
| **SBX**         | `.sbx`                 | —            | Scanbox calcium imaging format. Suite2p input.                          |
| **MDA**         | `.mda`                 | —            | MountainSort format. SpikeInterface input.                              |
| **BIN/DAT/RAW** | `.bin`, `.dat`, `.raw` | —            | Raw electrophysiology recordings. SpikeInterface input.                 |
| **NPY/NPZ**     | `.npy`, `.npz`         | —            | NumPy arrays. Common model output format.                               |
| **MAT**         | `.mat`                 | —            | MATLAB data files.                                                      |

## Standard image formats

| Format   | Extensions      | Viewer           | Notes                    |
| -------- | --------------- | ---------------- | ------------------------ |
| **PNG**  | `.png`          | Fabric.js Canvas | Standard raster image.   |
| **JPEG** | `.jpg`, `.jpeg` | Fabric.js Canvas | Standard raster image.   |
| **GIF**  | `.gif`          | Fabric.js Canvas | Animated GIF support.    |
| **BMP**  | `.bmp`          | Fabric.js Canvas | Bitmap image.            |
| **WebP** | `.webp`         | Fabric.js Canvas | Modern web image format. |
| **SVG**  | `.svg`          | Fabric.js Canvas | Vector graphics.         |

## Video formats

| Format   | Extensions | Viewer       | Notes                                                 |
| -------- | ---------- | ------------ | ----------------------------------------------------- |
| **MP4**  | `.mp4`     | Video Player | Frame-by-frame navigation. DeepLabCut and SAM3 input. |
| **AVI**  | `.avi`     | Video Player | Frame-by-frame navigation.                            |
| **MOV**  | `.mov`     | Video Player | QuickTime format.                                     |
| **MKV**  | `.mkv`     | Video Player | Matroska container.                                   |
| **WebM** | `.webm`    | Video Player | Web video format.                                     |

## Data formats

| Format   | Extensions | Notes                                                 |
| -------- | ---------- | ----------------------------------------------------- |
| **CSV**  | `.csv`     | Tabular data. Model output, keypoint tracks.          |
| **TSV**  | `.tsv`     | Tab-separated values.                                 |
| **JSON** | `.json`    | Structured data. Pipeline definitions, model configs. |
| **PKL**  | `.pkl`     | Python pickle files.                                  |
| **Zarr** | `.zarr`    | Chunked array storage. SpikeInterface input/output.   |

## 3D / Volumetric formats

| Format                       | Type      | Notes                                                                |
| ---------------------------- | --------- | -------------------------------------------------------------------- |
| **Neuroglancer Precomputed** | URL-based | 3D brain volumes and connectomics. Rendered via Neuroglancer viewer. |
| **Allen CCFv3**              | URL-based | Reference atlas volumes (10um resolution).                           |

## Automatic file routing

Relay automatically routes files to the correct viewer based on type:

* **TIFF/OME-TIFF** files → Viv/deck.gl scientific viewer (multi-channel, Z-stack support)
* **Files > 2 GB** → Always routed to Viv viewer regardless of format
* **Standard images** (PNG, JPEG, etc.) → Fabric.js canvas
* **Video files** → Video player with frame navigation
* **DICOM** → DICOM viewer with window/level controls
* **NWB** → Spike viewer with trace visualization
* **Neuroglancer URLs** → Neuroglancer 3D viewer

## Upload limits

| Method           | Max Size | Notes                             |
| ---------------- | -------- | --------------------------------- |
| Simple upload    | 100 MB   | Single-part upload to Relay Drive |
| Multipart upload | 50 GB    | Chunked upload with pause/resume  |
| Asset upload     | 5 GB     | Direct asset upload               |
| S3 direct upload | 2 GB     | Presigned URL upload              |
