Vinegar is primarily composed of acetic acid, which has the molecular formula CH₃COOH.
While vinegar contains other compounds like water and trace amounts of other acids, acetic acid is the main component responsible for its characteristic sour taste and smell.