NII to PNG Converter for .nii and .nii.gz Slices | MiConvert

NII to PNG: Save Any Slice of a NIfTI Volume

Load a .nii or .nii.gz volume, move the slice slider to the section you need and download it as a PNG, with the volume read on your device instead of uploaded. Each download is a single 8-bit slice, so a full stack means saving slices one by one.

🔒 Zero-Upload — Your files never leave your device
🏥

Drop your file here

DICOM (.dcm, single files or a whole series), NIfTI (.nii, .nii.gz), NRRD (.nrrd), MHA (.mha), MHD (.mhd + .raw)

Select File

Up to 1 GB per file • Processed locally

Zero Upload 100% Browser Processing No Sign Up 100% Free
NII → PNG

Why NIfTI files need converting to PNG

NIfTI is the standard volume format in neuroimaging research. Tools such as FSL, SPM and AFNI read and write .nii files, often gzipped to .nii.gz. Each file is a 3D or 4D grid of voxels plus a short header, which an image editor, slide program or manuscript system cannot display. A poster, a lab meeting slide or a quick message to a collaborator usually needs a PNG of one slice.

MiConvert reads NIfTI-1 and NIfTI-2 headers with the nifti-reader-js library and decompresses .nii.gz files with pako, all inside the page. It opens the volume on its middle slice along the file's third axis, which is often axial but depends on how the data was stored. The tool does not use any display range stored in the NIfTI header. Contrast is set automatically from the 1st to 99th percentile of the slice's values, and you can override it with the window and level sliders.

The PNG maps each voxel of the slice to one pixel and keeps the contrast you chose; PNG compression adds no further loss. The rest of the data is not carried over. Float or 16-bit intensities are squeezed into 8 bits. Voxel size and orientation from the header are not applied, so the slice may look stretched, rotated or mirrored compared with FSLeyes or ITK-SNAP. Other slices and time points are not included, and statistical maps come out as plain grayscale with no color overlay.

The tool suits anyone who needs a figure-ready slice of a T1, a lesion mask or an fMRI mean image without installing a viewer. It does not suit anyone who needs measurements, an entire slice stack or a format change such as NIfTI to DICOM.

How to export a NIfTI slice as PNG

  1. Check that you have a single .nii or .nii.gz file of 200 MB or less. Analyze .hdr/.img pairs are not accepted, so convert them to NIfTI first.
  2. Load the file. The preview opens on the middle slice of the volume.
  3. Drag the slice slider to the section you want.
  4. If the automatic contrast hides the structure you care about, such as faint white-matter changes, adjust level and width.
  5. Choose PNG and download. Repeat steps 3 to 5 for each additional slice you need.

NIfTI to PNG features

  • Reads uncompressed .nii and gzipped .nii.gz files, in both NIfTI-1 and NIfTI-2.
  • Provides a slice slider across the volume's third axis, starting from the middle slice.
  • Sets contrast automatically from percentiles, with manual level and width sliders for fine control.
  • Saves PNG at one pixel per voxel, with lossless compression of the 8-bit slice.
  • Offers JPG and a single-page A4 PDF for the same slice when PNG is not what you need.
  • Converts in the page, one file at a time, up to 200 MB on every plan.

Video Tutorial

Detailed guide on how to convert NII files to PNG quickly, for free, and without losing original quality. Perfect if you need to process file formats, reduce size, or upload files to systems that only

NII to PNG questions

Does it work with .nii.gz files?

Yes. Gzipped NIfTI is decompressed in the page before it is read, so there is no need to unzip it first.

Can I export every slice as PNG in one go?

No. Each download is the slice currently on screen, and the tool takes one file at a time. For a handful of slices, move the slider and save each one. For a whole stack, use a short Python script with nibabel and an image library, or a viewer with batch export.

How do I convert NII to JPG instead?

Choose JPG as the output in the same tool. It saves the same 8-bit slice with JPEG compression at quality 0.92. JPG files are smaller but can soften fine edges, so PNG is the safer choice for masks and thin structures.

Can this convert NIfTI to DICOM, or DICOM to NIfTI?

No. The tool only exports 2D pictures of a slice. For DICOM to NIfTI, dcm2niix is the usual open-source choice. For NIfTI to DICOM, research tools such as 3D Slicer can write a DICOM series.

How do I turn a .nii into a .nii.gz?

A .nii.gz is plain gzip compression of the same file, so it is not an image conversion and this tool does not do it. Run gzip on the file, or save with compression from FSL or nibabel. Both forms load here.

Why does my slice look rotated, squashed or too dark?

The slice is drawn one pixel per voxel, without the voxel size or orientation stored in the header, so it can differ from a neuroimaging viewer. Rotate or flip the PNG afterward if needed. A dark result comes from the automatic window; drag the level and width sliders until the tissue you want is visible. For a 4D file, the slider moves through slices only, not through time points.

I get "Not a valid NIfTI file" or a library error. What now?

"Not a valid NIfTI file" means the header could not be read, for example from a truncated download or a file that is not really NIfTI despite its name. Re-download or re-export the volume. "NIfTI library (nifti-reader-js) not loaded" and "Medical converter engine not loaded" mean a script from cdn.jsdelivr.net did not arrive. Allow that domain and reload the page.

Is my scan uploaded?

No. The volume is opened and the PNG is produced in your browser, so the voxel data never reaches MiConvert's servers. A few details still travel: - The page loads its libraries from cdn.jsdelivr.net. - When Google Analytics is loaded, it receives the file name, size and format. - A file over 200 MB is refused and reported to us by name, size and format. Use a neutral file name for subject data. The page also needs an internet connection to load its libraries.