A betaine (BEET-ah-een, /ˈbiːtɑːˌiːn/) in chemistry is any neutral chemical compound with a positively charged cationic functional group such as a quaternary ammonium or phosphonium cation (generally: onium ions) which bears no hydrogen atom and with a negatively charged functional group such as a carboxylate group which may not be adjacent to the cationic site. A betaine thus may be a specific type of zwitterion. Historically the term was reserved for TMG (trimethylglycine) only. Biologically, betaine is involved in methylation reactions and detoxification of homocysteine.
The pronunciation of the compound reflects its origin and first isolation from sugar beets (Beta vulgaris subsp. vulgaris), and does not derive from the Greek letter beta (β). However, it is often pronounced beta-INE or even BEE-tayn.
In biological systems, many naturally occurring betaines serve as organic osmolytes, substances synthesized or taken up from the environment by cells for protection against osmotic stress, drought, high salinity or high temperature. Intracellular accumulation of betaines, non-perturbing to enzyme function, protein structure and membrane integrity, permits water retention in cells, thus protecting from the effects of dehydration. It is also a methyl donor of increasingly recognised significance in biology.