It is on the World Health Organization's List of Essential Medicines. Methylene blue was first prepared in 1876, by Heinrich Caro. While use during pregnancy may harm the baby, not using it in methemoglobinemia is likely more dangerous.
Common side effects include headache and vomiting. Methylene blue is typically given by injection into a vein. It has previously been used for treating cyanide poisoning and urinary tract infections, but this use is no longer recommended. Specifically, it is used to treat methemoglobin levels that are greater than 30% or in which there are symptoms despite oxygen therapy.
As a medication, it is mainly used to treat methemoglobinemia by chemically reducing the ferric iron in hemoglobin to ferrous iron. Methylthioninium chloride, commonly called methylene blue, is a salt used as a dye and as a medication.