The design of surfactants for stabilizing CO2-in-water (brine) (C/W) foams at high temperature is challenging given the low density (solvent strength) of CO2, limited surfactant solubility in brine, and a lack of knowledge of the interfacial and rheological properties. Herein, the tail length of trimethylammonium cationic surfactants was optimized to provide the desired phase behavior and interfacial properties for formation and stabilization of the C/W foams. The headgroup was properly balanced with a C12–14 hydrocarbon tail to achieve aqueous solubility in 22% total dissolved solids (TDS) brine up to 393 K (120 °C) along with high surfactant adsorption (area/surfactant molecule of 154 Å2) at the CO2–water (C–W) interface which reduced the interfacial tension from ∼40 mN/m to ∼6 mN/m. For C12–14N(CH3)3Cl, these properties enabled stabilization of a C/W foam with an apparent viscosity of 14 mPa·s at 393 K in both a crushed calcium carbonate packed bed (75 μm2 or 76 Darcy) and a capillary tube downstream of the bed. In addition, the partition coefficient of the surfactant between oil and 22% TDS (255 kg/m3) brine was less than 0.15, which would be beneficial for minimizing the loss of the surfactant to an oil phase in applications including enhanced oil recovery and hydraulic fracturing.