Pharmaceutical compositions comprising a fatty acid salt, a dicarboxylic acid salt, an alkyl sulfate salt, an aryl sulfate salt or an alkyl aryl sulfonate salt of methylene blue or a derivative of methylene blue are described herein. The compositions are preferably administered orally and can be administered as tablets, soft or hard shell capsules (e.g. soft gelatin capsules), suspensions or solutions. The composition can also be formulated as a suppository or enema or rectal administration. The compositions further comprise a pharmaceutically acceptable carrier and optionally one or more pharmaceutically acceptable excipients. Suitable excipients include diluents, binders, plasticizers, lubricants, disintegrants, colorants, stabilizers, surfactants, and combinations thereof. The fatty acid salts, alkyl sulate salts, aryl sulfate salts or alkyl aryl sulfonate salts can be co-mixed or co-melted with one or more fatty acids to make more hydrophobic compositions, which may result in less staining formulations. The compositions can be formulated for immediate release, controlled release such as extended release, delayed release, and pulsatile release, or combinations thereof. In one embodiment, the derivative of methylene blue is methylene dodecylsulfate.