Wettability alteration is an important method for increasing oil recovery from oil-wet carbonate reservoirs. Chemical agents like surfactants are known as wettability modifiers in carbonate systems. Oil can be recovered from initially oil-wet carbonate reservoirs by wettability alteration from oil-wet to water-wet condition with adding dilute surfactant and electrolyte solutions. This paper investigates the effects of brine concentration, surfactant concentration, and the pH of injection water on the wettability alteration of carbonate reservoirs by different class of surfactants. Scanning electron microscopy images verified the formation of surfactant layer surfaces and the adsorption of surfactant molecules on the rock. The results revealed that TX-100, as a nonionic surfactant, and CTAB, as a cationic surfactant, were better wettability modifiers than SDS, as an anionic surfactant, for carbonate rocks. At the concentration of 1 wt.% and higher, the contact angle reduction was approximately unchanged. The results also proved that there was an optimum salinity for the maximum wettability alteration by surfactants. Increasing the pH of aging fluid resulted in better wettability alteration by CTAB, while, in the case of SDS, the wettability alteration was reduced. Acidic conditions had a negligible effect on the wetting behavior of TX-100.