So you ran dcm2niix and something went wrong. No output files, a crash, a volume that looks merged when it should be split, or a sidecar that never appeared. Take a breath: nearly every dcm2niix problem has a plain cause and a quick fix, and the same handful of mistakes accounts for almost all of them. This guide walks through the common failures in the order you should check them, so you can get back to converting instead of guessing.
Problem 1: “Argument list too long” crash
This is the classic beginner crash, and the cause is almost always a wildcard. If you ran something like dcm2niix /path/*.dcm, your shell expanded the wildcard into a huge list of filenames before dcm2niix ever saw it, and the operating system refused the oversized command. The fix is simple: pass a folder instead of a file pattern. Run dcm2niix /path/to/folder and let the tool search the folder itself. That is the intended usage, and the crash disappears.
Problem 2: No output files at all
dcm2niix ran, printed some text, and produced nothing. Work through these checks in order. First, is your input folder really holding DICOM files? A folder of zip archives, screenshots, or already converted NIfTI will not convert, and dcm2niix will quietly find nothing to do. Second, are you pointing at the right folder level? If your data sits in nested series folders, point at the session folder and let the recursive search work, rather than pointing at an empty parent. Third, use the inspection trick: run dcm2niix -n -1 /path/to/folder. It lists the series the tool can see and converts nothing. If that list is empty, the tool genuinely sees no DICOM, and your folder is the problem, not the tool.
Problem 3: Series merged or split unexpectedly
Your conversion produced one volume where you expected several, or several where you expected one. The -m option is the control here. With -m y, 2D slices from the same series are merged into a single image regardless of echo, coil, or orientation differences. With -m n, they are kept separate based on those attributes. If the default result looks wrong, flip the flag and compare. Multi echo and multi band data are the usual cases where the default choice does not match your expectation, and trying both settings settles it fast.
Problem 4: Missing JSON sidecar
Your NIfTI file appeared but no .json sidecar came with it. The first check is the -b option, which controls BIDS sidecar output and defaults to y. If you passed -b n somewhere, in a script or a defaults file, sidecars will be off. Turn it back to y. If -b is already y and sidecars are still missing, check your output folder: sidecars are written next to the NIfTI files, so a sidecar hunt in the wrong folder looks exactly like a missing sidecar. Also check that the conversion actually completed; a run interrupted halfway can leave images without their companions.
Problem 5: Philips data looks scaled wrong
Philips images that look washed out, oddly bright, or strangely scaled usually need the precision scaling option. Try -p y and compare with your previous output. Philips stores scaling in a way that sometimes needs this flag, and it is a one flag fix. If toggling it does not help, check the image in a second viewer before assuming the conversion is wrong, since display settings can mimic scaling problems.
Problem 6: A tool cannot read your output
Your conversion succeeded but a downstream program rejects the files. The most common cause is compression: some older tools expect plain .nii and cannot open .nii.gz. Reconvert with -z n and try again. If the tool still complains, check that it supports the NIfTI variant you produced, and confirm the file is not truncated from an interrupted run. A file that ends mid volume will fail everywhere, and the fix is simply rerunning the conversion.
Problem 7: Diffusion data lacks bval or bvec
Diffusion output without .bval and .bvec files has two usual explanations. One, the series was not actually diffusion weighted, in which case no bval or bvec should exist and everything is fine. Two, the series was split during conversion, so the diffusion volumes landed in a different output than you checked. Compare volume counts and check the full output folder. Our diffusion guide explains the checks in detail.
Problem 8: Everything is slow on a big study
If conversions crawl on a multi subject study, the cause is usually workflow, not the tool. The GUI converts one folder at a time with a human in the loop, which is slow by design. Switch to the command line and a loop over subject folders, as our batch guide describes. Also check disk speed and free space: writing uncompressed output to a slow or nearly full disk will bottleneck any converter. Compressed output with -z y reduces both problems at once.
Problem 9: Command not found
Your terminal answers “command not found” when you type dcm2niix. The binary is almost certainly fine; it is just not on your PATH. Either call it by its full path, move it into a folder that is on your PATH, or add its folder to your PATH. If you installed through MRIcroGL, remember the binary lives inside the application folder, not necessarily somewhere your shell looks.
Problem 10: Output looks right but the pipeline disagrees
Sometimes the conversion looks fine and fMRIPrep or another pipeline still complains. In that case the sidecar is your evidence. Open the JSON and check the values the pipeline needs: repetition time, phase encoding direction, slice timing. A wrong phase encoding direction, for example, will break distortion correction even though the image looks perfect to your eye. Fix the value at the source, in the conversion or in the protocol, rather than overriding it downstream and forgetting about it.
When none of these fixes work
Sometimes you work through every section above and the problem stays. At that point, change tactics. First, confirm your dcm2niix version and check the project release notes for fixes related to your scanner or sequence, since the issue may already be solved in a newer release. Second, build the smallest possible reproduction: one series, one folder, one command, and see whether the problem survives. A minimal case is far easier to debug, and it is also what you will need if you ask for help. Third, search the project issue tracker for your scanner model and sequence type, since someone may have reported the same behavior with a solution. Fourth, test with a different dataset if you can, to separate a data problem from a tool problem. If the problem follows the data, the DICOM itself deserves a closer look, possibly with your scanner operator. If it follows the tool across datasets, a careful bug report with your minimal case helps the maintainers and the next person who hits the same wall.
Conclusion
dcm2niix problems almost always trace back to a short list: wildcards instead of folders, wrong folder levels, merge settings, a disabled sidecar option, Philips scaling, compression mismatches, or a binary that is not on your PATH. Work through them in order, use -n -1 to see what the tool sees, and change one thing at a time. The tool rewards a careful setup with years of reliable conversions, so the few minutes of checking are well spent.
Read next:
