Codeine or 3-methylmorphine (a naturally occurring methylated morphine) is an opiate used to treat pain, as a cough medicine, and for diarrhea. It is often sold as a salt in the form of either codeine sulfate or codeine phosphate in the United States, United Kingdom and Australia; codeine hydrochloride is more common worldwide and the citrate, hydroiodide, hydrobromide, tartrate, and other salts are also seen.Codeine is the second-most predominant alkaloid in opium, at up to three percent.