Cocamidopropyl betaine is derived from coconut oil. It works as a cleanser, conditioner and thickening agent, though itβs primarily a surfactant. Surfactants are ingredients that attract dirt and oil so that you can rinse them off of your skin or hair. It is widely used in hair and skin care products.