Health and Fitness

How to View NIfTI (.nii) MRI Files in Your Browser

Open .nii and .nii.gz neuroimaging files, move through axial, coronal and sagittal slices, set window and level, add overlays and measure.

Saizul Amin
Saizul Amin19 Nov 2026 · 3 min read
How to View NIfTI (.nii) MRI Files in Your Browser

How to View NIfTI (.nii) MRI Files in Your Browser

If you work with brain imaging data, you meet NIfTI files all the time: anatomical scans from an open dataset, the output of a preprocessing pipeline, a brain mask or a statistical map. Installing a full desktop viewer just to check one of them is a nuisance, especially on a borrowed laptop or a tablet. The free NIfTI Viewer opens them in the browser.

One note first. This is a research and teaching viewer. It is not a medical device and it does not interpret images. Hospital scans are usually delivered as DICOM and must be read by a radiologist; questions about your own scans belong with your doctor.

A short look at the format

NIfTI grew out of the older Analyze format and is now used by nearly every neuroimaging package. A NIfTI-1 file has a 348-byte header; NIfTI-2 extends it to 540 bytes for very large images. The header gives the grid size, the voxel size, the data type, a scaling slope and intercept, and two ways to describe the position of the image in space: the qform and the sform. The voxel values follow, either in the same .nii file, often gzip-compressed as .nii.gz, or in a separate .img file next to a .hdr header.

The spatial transform matters because programs store voxels in different orders. Without it a brain can appear upside down or mirrored. The viewer reads the sform, or the qform if the sform is missing, works out which way each voxel axis points and shows the image in a standard orientation. The header line reports the orientation code, such as RAS or LAS.

Moving around

The three views show axial, coronal and sagittal slices through the crosshair. Tap or drag in any view to move it; the other two follow. Each view has its own slider and plus and minus buttons for slice-by-slice stepping, and the status line gives the voxel position and its value.

Two display conventions exist. In neurological convention the left side of the brain is on the left of the screen. In radiological convention, used on clinical workstations, it is on the right, as if you face the patient. Switch with the checkbox; the letters at the edges of each view always show which side is which.

Window and level

MRI intensities have no fixed scale, so the viewer starts with Auto window, which ignores the darkest and brightest one percent of non-zero voxels. Drag with the Window/level tool, left and right for contrast and up and down for brightness, or type the centre and width. If the header carries cal_min and cal_max, File window applies them.

For 4D data such as fMRI or diffusion series, a slider steps through the volumes. Each volume is decoded only when you reach it, which keeps memory use down.

Overlays

Quality checks often mean looking at one image on top of another. Add an overlay file on the same grid, such as a brain mask from skull stripping, a tissue segmentation, an atlas or a thresholded statistics map. Set the threshold, choose heat, cool, green or label colours and adjust the opacity. If the grids differ, the viewer says so; resample first in your processing software.

Measuring and exporting

With the Measure tool, tap two points in a view and the length appears in millimetres, using the voxel size of that plane. Measurements are listed with their view and slice and can be revisited or removed. Each view can be saved as a PNG, and the montage button saves a grid of axial slices across the volume, handy for methods sections and quick reports.

Limits

The viewer does not reslice obliquely, render surfaces, register images or convert DICOM to NIfTI, and old Analyze files without the NIfTI marker are not read. It is meant for looking, checking and teaching, with all files kept on your own device.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages