NIfTI Metadata Viewer

View metadata from .nii and .nii.gz brain imaging files. Extract shape, voxel sizes, orientation, affine matrix, statistics. Used by fMRI, DTI, structural MRI. No desktop neuroimaging suite required.

1.0.0
Version
Auth
Batch

About NIfTI Metadata Viewer

A collaborator emails you a brain.nii.gz for a quick sanity check, an open dataset (HCP, OpenNeuro, ADNI) drops a study in your inbox, or a pipeline you're debugging produces a NIfTI you need to inspect — and you just want to know what shape it is, what the voxel sizes are, and which way the patient's head is pointing. The desktop options (FSL, FreeSurfer, AFNI, ITK-SNAP, 3D Slicer) are full neuroimaging suites built for full analyses; installing one to read a single header is a workshop's-worth of effort.

This NIfTI metadata viewer parses NIfTI-1 and NIfTI-2 headers (.nii and .nii.gz) and surfaces the structural fields you actually need. Shape (dim1 × dim2 × dim3 × time × …), voxel sizes (mm), data type (uint8, int16, float32, …), orientation (RAS / LAS / LIA based on the affine), the affine matrix with its qform/sform codes, and intensity statistics (voxel count, min/max/mean/std/non-zero count). The complete header dump — sizeof_hdr, intent_code, descrip, cal_min, cal_max, aux_file — is also available alongside the JSON download. Pixel data is not transmitted back beyond what's needed to compute statistics; the header inspection is the focus. Files up to 100 MB (covers typical whole-brain T1 and fMRI volumes), and the file is discarded immediately after the response.

Use it to confirm orientation before importing a NIfTI into a pipeline that assumes RAS, debug a converter that swapped X and Y, audit a public-dataset cohort's voxel sizes for resampling needs, inspect a structural T1 a colleague handed over, check intensity range before normalising, or just open a .nii.gz without firing up ITK-SNAP. Files up to 100 MB.

NIfTI Metadata Viewer Use Cases

  • Neuroimaging researchers confirming orientation before importing into a RAS-assuming pipeline
  • Debugging a DICOM → NIfTI converter that may have swapped axes or flipped a sign
  • Auditing voxel sizes across an open dataset (HCP, OpenNeuro, ADNI) to plan resampling
  • Quick header check on a structural T1 a collaborator emailed for a study handoff
  • Verifying intensity range before normalisation or histogram-matching across subjects
  • Sanity-check on a pipeline output's affine matrix when registration looks suspect
  • Educators showing students what a NIfTI header carries beyond the image array

NIfTI Metadata Viewer Features

  • Parses NIfTI-1 and NIfTI-2 in both .nii and .nii.gz forms — single-file format used by FSL, FreeSurfer, AFNI, SPM and Nilearn
  • Surfaces shape, voxel sizes (mm), data type and orientation (RAS/LAS/LIA) derived from the affine
  • Affine transformation matrix shown alongside qform_code and sform_code so you can see which transform is authoritative
  • Intensity statistics — voxel count, min, max, mean, standard deviation, non-zero count — without leaving the page
  • Full header dump (sizeof_hdr, intent_code, descrip, cal_min/cal_max, aux_file, slice_code) available as structured JSON
  • JSON download mirrors the on-page table for scripting and dataset-level audits across hundreds of files
  • Files up to 100 MB processed in a stateless serverless function and discarded immediately after the response

How to Use NIfTI Metadata Viewer

Upload your .nii or .nii.gz

Drag-and-drop a NIfTI-1 or NIfTI-2 file (up to 100 MB). Both the uncompressed .nii and gzip-compressed .nii.gz forms work — the parser detects the magic bytes automatically. Whole-brain T1 volumes typically run 5–30 MB, fMRI runs 20–80 MB.

Click Parse

The serverless parser uses nibabel-equivalent logic to read the 348-byte (NIfTI-1) or 540-byte (NIfTI-2) header, decode the affine from qform/sform, and compute intensity statistics on the voxel array. Typically under a second.

Read the summary panel

Shape (dimension count and per-dim sizes), voxel sizes in millimetres, data type, the derived orientation code (RAS, LAS, LIA, etc.) and file size. These are the first things you usually want to confirm about a new file.

Inspect the affine matrix

The 4×4 affine is shown with its qform_code and sform_code. When both are set, sform is authoritative for downstream pipelines but it pays to verify both agree — disagreement is a common source of mis-registered downstream output.

Review intensity stats and export

The stats panel shows voxel count, min/max/mean/std and non-zero count — useful for spotting empty volumes, masks where you expected images, or wildly out-of-range intensities. Download JSON for scripted audits.

NIfTI Metadata Viewer FAQ

No. The file is uploaded to a stateless serverless function, parsed, and discarded immediately after the response. Nothing is logged to durable storage, no thumbnails are cached. That said, for clinical PHI-bearing imaging on a HIPAA-regulated workflow, local nibabel is the safer path — header parsing is 5 lines of Python and never transits the network.

Both. NIfTI-1 is the original 348-byte header (used by almost all current FSL/SPM/FreeSurfer pipelines). NIfTI-2 is the extended 540-byte header that allows larger dimensions and is used by some newer pipelines and very large connectomics datasets. The parser detects which version a file uses from the sizeof_hdr field and handles both transparently.

It's the three-letter code derived from the affine matrix that describes which anatomical direction each axis points in. RAS = +X is Right, +Y is Anterior, +Z is Superior. LAS, LPI, RSA and others are different permutations. RAS is the most common modern convention (used by FSL, Nilearn, MNI templates). LAS shows up in older DICOM conversions. Mismatch between expected and actual orientation is the most common cause of left/right flipped results in downstream pipelines.

NIfTI stores two transforms — qform (a rigid rotation + translation + scaling encoded as a quaternion) and sform (a full general 4×4 matrix). Each has a code (qform_code, sform_code) indicating its meaning: 0 means unset, 1 means scanner-aligned, 2 means aligned to another scan, 3 means Talairach, 4 means MNI. When both are set with non-zero codes, sform is authoritative for downstream tools — but they should agree.

100 MB. This covers whole-brain T1 structurals (typically 5–30 MB), 4D fMRI runs (20–80 MB) and most diffusion-weighted (DWI) volumes. Very long fMRI runs or high-resolution 7T datasets can exceed 100 MB — for those, run nibabel locally or split the 4D file along the time dimension before uploading.

No — this is a metadata inspector, not a viewer. To visualise voxel data, ITK-SNAP, FSLeyes, 3D Slicer or the Brain Viewer Webapp (socr.umich.edu) are the right tools. The trade-off is that this tool surfaces the header metadata in a clean structured view, which the full visualisers tuck behind multiple menus.

Not currently — only the single-file .nii / .nii.gz format. The older Analyze 7.5 / NIfTI-1 pair (.hdr + .img as two separate files) is less common now. To convert to single-file NIfTI, FSL's fslchfiletype command does it in one line, after which the resulting .nii.gz works here.

Research / clinical data: NIfTI files from clinical subjects can be PHI. The file is parsed in memory and deleted after the response. For de-identification workflows, consider running locally with nibabel.

Upload .nii or .nii.gz file

fMRI, DTI, structural MRI, PET volumes • Max 100MB

Requires login • 2 credits

NIfTI Metadata Viewer Tutorial

What is NIfTI?

NIfTI (Neuroimaging Informatics Technology Initiative) is the standard file format for brain imaging — an improvement over ANALYZE format. Almost every fMRI dataset, DTI study, structural MRI, and PET image you'll encounter is stored as .nii or .nii.gz (gzipped).

What This Tool Shows

  • Shape — volume dimensions, e.g. (64, 64, 30) or (96, 96, 56, 120) for 4D time series
  • Voxel sizes — millimeters per voxel in X/Y/Z
  • Orientation — RAS, LAS, LPS codes for how voxel axes map to anatomy
  • Affine matrix — 4×4 matrix mapping voxel indices to world coordinates (mm)
  • Data type & statistics — intensity range, mean, standard deviation
  • Full NIfTI header dump — all fields (sizeof_hdr, intent, qform_code, descrip, etc.)

Why This Tool?

You get a NIfTI file over email / Slack / a dataset archive and you want to quickly check:

  • "What's the resolution?"
  • "How many volumes — is this 4D?"
  • "What orientation is the data in?"
  • "Is this anonymized? (checking the descrip field)"

Installing FSL, SPM, AFNI, or MRIcroGL just to run fslinfo is heavy. This does the job in a browser tab.

Pixel Data

We read the file only to extract header + compute basic intensity stats. No image slices are rendered — for that use NiiVue, MRIcroGL, or Papaya.

Format Support

  • NIfTI-1 (standard)
  • NIfTI-2 (extended for >32767 voxels per axis)
  • Uncompressed .nii and gzipped .nii.gz