Low salinity water injection stands as a progressive method for enhanced oil recovery, representing a current focus of extensive research. Understanding wettability alteration in crude oil is hindered by its intricate nature, posing a challenge for researchers. In order to better understand wettability alteration and underlying phenomena in an oil–brine–rock system, a fundamental study was carried out using pure hydrocarbon (aliphatic: n‐heptane; aromatic: toluene) and crude oil on quartz surface against engineered water consist of monovalent (NaCl) and divalent (MgSO4) salts in various compositions (NaCl:MgSO4: 100:0; NaCl:MgSO4: 0:100; NaCl:MgSO4: 75:25; NaCl:MgSO4: 50:50; NaCl:MgSO4: 25:75). The variables under investigation include temperature (25 to 65°C), pure hydrocarbons (toluene, n‐heptane), crude oil (Indian offshore), and brine (B1 to B5) with concentration (0 to 20,000 ppm). The findings show that when brine solution contains solely NaCl salt at a concentration of 2000 ppm, n‐heptane exhibits a minimum contact angle on quartz plate. Contrarily, toluene exhibits a low contact angle with a brine solution that only contains MgSO4 salt at a concentration of 2000 ppm. The intriguing finding is that when monovalent and divalent salts are equal (NaCl:MgSO4: 50:50) in the brine, crude oil exhibits the smallest contact angle on quartz. Additionally, temperature and contact angle are directly related for all oil types. The optimal brine for achieving the minimum contact angle on quartz surface is (B1)2000 for n‐heptane, (B2)2000 for toluene, and (B4)2000 for crude oil for the current study. The study findings indicate that the alteration in wettability due to brine composition and salinity varies among different oil samples, characterized by purely aliphatic, aromatic, and mixed components, and it depends on the type of salt compositions. Higher salts concentration minimally affects n‐heptane but influences toluene and crude oil contact angles.