NIfTI to PNG Converter, One Slice per Export | MiConvert

NIfTI to PNG: Save a Clean Slice from Your Scan

Pick a slice from a .nii or .nii.gz volume, tune its contrast, and save it as a PNG with no compression artifacts. Keep the original file for analysis: the PNG holds 8-bit display values, not the scanner's numbers.

🔒 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
NIFTI → PNG

Why export NIfTI slices to PNG

A NIfTI file is not a picture but a grid of measurements: voxels stacked into a volume, plus a header describing their size and position in space. Neuroimaging software such as FSLeyes, MRIcroGL or ITK-SNAP renders that grid on screen. Manuscript templates, poster software, wikis and image editors want an ordinary image file instead. PNG is the usual choice when edges and fine detail must stay crisp.

Here the work happens in the page itself. A JavaScript NIfTI reader parses the header and voxel data of your .nii or .nii.gz, and the pako library inflates compressed files. The viewer lands on the central slice, and you can step to any other slice along the volume's third dimension. Contrast starts from an automatic window covering the 1st to 99th percentile of that slice. Drag the window and level controls to refine it, then export.

PNG compression is lossless, so every pixel of the displayed slice is saved exactly as drawn, at the volume's native in-plane resolution and fully opaque. The losses happen earlier, when the scan becomes a display image. Real intensities are mapped to 256 gray levels, only the current slice is written, and the spatial metadata is not carried over. Because voxel spacing is ignored, anisotropic data can appear stretched. The slice may also be rotated or flipped relative to radiological or neurological convention. Color volumes such as RGB maps are not handled; everything renders in grayscale.

Researchers and students use this to put a representative slice into a figure draft, a lab notebook or a thesis appendix. It is also a quick way to see what a downloaded dataset contains before setting up a pipeline. Many searches for NIfTI to PNG mention Python, so the FAQ covers the scripted route for when you need every slice. Neither the PNG nor this tool is meant for clinical reading.

Steps to save a NIfTI slice as PNG

  1. Start from a single .nii or .nii.gz file no larger than 200 MB. A NIfTI stored as a separate .hdr and .img pair is not accepted; re-save it as one .nii in your analysis software first.
  2. Choose the file in the converter. Your browser reads it directly, so there is no upload to wait for.
  3. Move the slice slider to the anatomy you want. The viewer starts at the center of the volume.
  4. If the automatic contrast hides detail, adjust the window controls. Width stretches or compresses the gray range, and level shifts it brighter or darker.
  5. Select PNG and download. For more slices from the same file, move the slider and download again.

NIfTI to PNG capabilities

  • Lossless PNG output of the displayed slice, opaque and at native pixel dimensions.
  • Accepts NIfTI-1 and NIfTI-2 headers, uncompressed or gzip-compressed.
  • Opens at the middle slice, with a slider to reach any slice along the third axis.
  • Percentile-based automatic contrast, plus manual window and level adjustment before saving.
  • The same slice can also be exported as JPG or as a one-page PDF from the same screen.
  • Scan data is read inside your browser; one file per run, up to 200 MB.

Video Tutorial

Are you struggling with how to convert your NIFTI file to PNG format? Don't worry, in this video I will reveal a super convenient tool to help you change your file extension completely for free withou

NIfTI to PNG FAQ

How do I convert NIfTI to PNG in Python?

Follow these steps: 1. Load the volume with nibabel: nib.load(path).get_fdata(). 2. Pick a slice along the axis you need. 3. Scale it to 0-255 with numpy. 4. Save it with Pillow or matplotlib's imsave. A script is the better choice when you want every slice, many files, or the same contrast across subjects. This tool does not offer those.

Is the PNG lossless compared with the original NIfTI?

The PNG format is lossless, but the conversion is not. Intensities are windowed to 8-bit before saving, so a 16-bit or floating-point scan loses precision, and the header is gone. Treat the PNG as a picture of the slice, not a copy of the data, and never use it as a diagnostic image.

Can I export all slices, or several files at once?

No. One file is loaded at a time, and each download is the slice on screen. Step through the slider for a handful of images. For whole volumes or many subjects, use a script like the one described above.

Can I keep transparency or a colored overlay?

No. The slice is rendered in grayscale with every pixel fully opaque, and color or RGB NIfTI data isn't supported. A segmentation or label map opens as a plain grayscale image. To produce a colored overlay figure, compose it in a neuroimaging viewer or an image editor.

How do I convert NIfTI to DICOM, or DICOM to NIfTI?

Neither direction is available here. For DICOM to NIfTI, dcm2niix is the common free choice. For NIfTI to DICOM, 3D Slicer or a Python workflow with nibabel and pydicom can write DICOM files. You'll need to provide patient and study information that NIfTI never stored.

Can this page convert NRRD to NIfTI?

No. It can open an NRRD file, but it only exports images from it, not NIfTI. 3D Slicer can open a .nrrd and save it as .nii.gz, and SimpleITK can do the same in a couple of lines of Python.

The page says 'Not a valid NIfTI file' or the NIfTI library didn't load.

'Not a valid NIfTI file' means the header couldn't be parsed. The file may be truncated or not actually NIfTI, so export it again from its source. 'NIfTI library (nifti-reader-js) not loaded' and 'Medical converter engine not loaded' mean a script from cdn.jsdelivr.net was blocked or a stale copy was cached. Allow that domain and hard-refresh.

What happens to my file and its name?

Your browser reads and draws the scan, and the PNG is created as a local download. The NIfTI data is not sent to our servers. Some details do go out: - Requests to cdn.jsdelivr.net load the reader libraries, and that CDN sees your IP address. - When Google Analytics is active, an analytics event carries the file name, size and format. - Only for files above 200 MB, a rejection report with the same three details goes to MiConvert. Using a neutral file name avoids exposing participant codes.