Getting dcm2niix onto your computer is quick, and there are a few good routes depending on your system. The tool is free and open source, developed at github.com/rordenlab/dcm2niix, and it is also bundled with MRIcroGL, which gives you a graphical converter as a bonus. This guide walks through each install route, Windows, macOS, and Linux, and finishes with a simple test that proves your install works. By the end you will have a working dcm2niix command ready for your first conversion.
Option 1: Install with MRIcroGL
The easiest route for most people, especially if you are new, is MRIcroGL. This free brain imaging viewer ships with dcm2niix built in, so installing the viewer installs the converter too. Download MRIcroGL for your system, install it the normal way, and look inside its application folder for the dcm2niix binary. On macOS, for example, it lives inside the MRIcroGL app bundle under Contents/Resources.
This route has a real advantage beyond convenience. MRIcroGL includes a simple converter interface: you drag a folder onto it, or use File/Convert DICOM to NIfTI, and it runs dcm2niix for you. Better still, the interface shows you the exact command line it is about to run. That makes it a great learning tool. Run a conversion in the GUI once, read the command it shows, and you have basically learned the command line version too.
Option 2: Download the standalone build
If you only want the converter, grab a prebuilt release from the dcm2niix GitHub repository. The project publishes builds for the major platforms. Download the archive for your system, extract it, and put the dcm2niix binary somewhere on your system PATH so you can call it from any terminal window.
On Windows, that usually means dropping the executable into a folder you keep for command line tools and adding that folder to your PATH, or simply running it from its own folder when you need it. On macOS and Linux, a common home is /usr/local/bin, or a personal bin folder that you have added to your PATH. If your shell answers “command not found” when you type dcm2niix, the binary is fine, it is just not on your PATH yet.
Option 3: Install through a package manager
Many Linux distributions and macOS package managers carry dcm2niix, and this is often the cleanest route on those systems. Package managers handle updates for you and place the binary on your PATH automatically. If you already manage your research software this way, check whether dcm2niix is available before you download anything by hand. The exact package name varies by distribution, so search your manager for “dcm2niix” first.
One caution with this route: distribution packages can lag behind the newest release. For most conversion work that does not matter, since the core behavior is stable. If you need a very recent fix for a particular scanner’s quirks, the GitHub release may be fresher than your distribution’s package.
Option 4: Build from source
Building from source is the route for people who need the absolute latest code or who run unusual systems. The dcm2niix repository includes build instructions, and the process follows the familiar pattern of configuring and compiling a C project. You will need a compiler and CMake, and the build produces a dcm2niix binary you can install as above.
Most users do not need this route. Prebuilt releases and packages cover the common cases with far less effort. Build from source when you have a specific reason: a fix that has not reached a release yet, a platform without prebuilt binaries, or a computing cluster where you install software yourself.
Check that it works
However you installed it, verify the result before you trust it with real data. Two quick checks cover almost everything:
- Run
dcm2niix -hin a terminal. A healthy install prints the help screen listing the available options. If you see that help text, the binary runs. - Run a tiny real conversion. Point it at a small test folder of DICOM data if you have one, for example
dcm2niix /path/to/test/folder, and confirm that a .nii file and a .json sidecar appear. If they do, your install, your file access, and your output writing all work.
If the help screen appears but a conversion produces nothing, the problem is almost never the install. It is usually the input folder: the wrong folder level, or files that are not DICOM. Our troubleshooting guide covers that case in detail.
Where the files live after installing
Two things are worth knowing once dcm2niix is on your machine. First, the defaults file: dcm2nii.ini holds default compression and filename settings, and it is created on your first run. If you want different defaults, edit that file with a text editor. On macOS, for instance, you can open it with TextEdit from your home folder. Second, the output habit: decide early where your converted files should go. Using the -o option to send output to a dedicated folder keeps converted data separate from raw DICOM, which makes your projects much easier to manage and much safer to share.
Setting up for a team or a lab
If you are installing dcm2niix for a whole lab, a little planning pays off. Agree on one install route so everyone runs the same version, because conversion results can shift slightly between releases. Keep a shared test dataset with known output, so a new install can be checked against expected results in seconds. And settle your folder conventions early: raw DICOM in one place, converted NIfTI in another, with the conversion commands saved in a script. When a new student joins, that script is worth more than any amount of verbal explanation.
Also decide your privacy workflow at install time, not later. Raw DICOM contains patient names, IDs, and dates in its headers. Make sure your storage is secured, and make anonymization part of the conversion routine before anything is shared. The -ba option helps keep BIDS sidecars anonymized, but it is not a substitute for a proper data handling policy.
After install: your first week with the tool
Once dcm2niix is installed, spend your first week on small, deliberate practice. Convert one test folder through the GUI if you installed MRIcroGL, and read the command it shows you. Then run the same conversion from the terminal and compare the outputs file by file. They should match exactly, and that match teaches you more than any manual. Next, convert a folder with several series and practice the -n -1 listing trick to see what the tool finds before it converts anything. Finally, try one conversion with explicit flags: compression on, a filename pattern you chose, and a dedicated output folder. By the end of that week, the tool will feel ordinary, which is exactly the goal. Conversion should be boring and reliable, not a puzzle you solve fresh every time.
Conclusion
Installing dcm2niix is a short job with several good routes. MRIcroGL is the friendliest start and teaches you the command line as you go. Standalone GitHub builds and package managers give you a clean command line tool. Building from source is there when you need the latest code. Whichever route you pick, finish with the two checks: the help screen and a small test conversion. Once dcm2niix answers at your prompt and produces a NIfTI file and a JSON sidecar, you are ready to convert real data.
Read next:

Pingback: dcm2niix on Windows, macOS and Linux