How to convert Grams to Milligrams. 1 gram (g) is equal to 1000 milligrams (mg). 1 g = 1000 mg. The mass m in milligrams (mg) is equal to the mass m in grams (g) times 1000: m(mg) = m(g) Ã 1000. Convert 5 g to milligrams: m(mg) = 5 g Ã 1000 = 5000 mg.