To convert milligrams (mg) to milliliters (ml), the number of milligrams must be multiplied by the density of the liquid, which equals the volume in liters,and then divided by 1,000 to convert liters to milliliters. The density of each liquid is unique.