Selection of surfactants for enhanced oil recovery and other upstream applications is a challenging task. For enhanced oil recovery applications, a surfactant should be thermally stable, compatible with reservoir brine, and have lower adsorption on reservoir rock, have high foamability and foam stability, and should be economically viable. Foam improves the oil recovery by increasing the viscosity of the displacing fluid and by reducing the capillary forces due to a reduction in interfacial tension. In this work, foamability and foam stability of two different surfactants were evaluated using a dynamic foam analyzer. These surfactants were fluorinated zwitterionic, and hydrocarbon zwitterionic surfactants. The effect of various parameters such as surfactant type and structure, temperature, salinity, and type of injected gas was investigated on foamability and foam stability. The foamability was assessed using the volume of foam produced by injecting a constant volume of gas and foam stability was determined by half-life time. The maximum foam generation was obtained using hydrocarbon zwitterionic surfactant. However, the foam generated using fluorinated zwitterionic surfactant was more stable. A mixture of zwitterionic fluorinated and hydrocarbon fluorinated surfactant showed better foam generation and foam stability. The foam generated using CO2 has less stability compared to the foam generated using air injection. Presence of salts increases the foam stability and foam generation. At high temperature, the foamability of the surfactants increased. However, the foam stability was reduced at high temperature for all type of surfactants. This study helps in optimizing the surfactant formulations consisting of a fluorinated and hydrocarbon zwitterionic surfactant for foam injections.