Reservoir quality in carbonates is influenced by various factors such as the depositional environment, burial history and diagenesis processes. Understanding these geological heterogeneities is essential for successful petroleum exploration. This study characterizes Brazilian pre-salt reservoirs and aims to understand how their heterogeneity impacts reservoir quality. We analysed carbonate samples from the Barra Velha Formation (Santos Basin) through an integration of petrographical and core plug descriptions, petrographical facies characterization, porosity and permeability measurements, and image analysis to identify the principal controls on porosity and permeability, pore-size distribution, and groups with similar petrophysical properties using the hydraulic flow unit (HFU) concept. Five facies groups were recognized: Spherulitestone (F1); Shrubstone (F2); Intraclastic Grainstone (F3); Intraclastic Packstone, Spherulitestone with mud and Shrubstone with mud (F4); and Shrub–Spherulite Intercalations and Bioclastic Grainstone (F5). The analysis of porosity and permeability showed that their variations are associated with pore type and cementation rate. Greater contributions of inter-aggregate, interparticle and vugular porosity, combined with a reduced amount of cement, results in higher porosity and permeability but an increase in cement tends to reduce the porosity and permeability. Among the facies groups, F2 and F3 exhibited the best porosities and permeabilities, followed by F1, F4 and F5. From image analysis, small pores (1.5 × 10−5–0.01 mm2) are the most common in all rocks. However, these small pores contributed significantly to total porosity only in F4 and some samples of F3. For F2 and F3, the large pores (from 0.01 mm2 to a maximum of 19.62 mm2) are the main contributors, while F5 has a homogeneous contribution. Finally, the data were grouped into five HFUs: HFU1 and HFU2 represent the zones with the best reservoir quality, primarily composed of F2 and F3.