• The concrete mesoscale concretization model is established to consider the heterogeneity of meso-components. • The effect of contact friction on the compressive failure behavior of concrete is studied. • Increasing the friction coefficient makes the size effect more pronounced. • A modified size effect law DHF-SEL is established. The purpose of this work is to examine the quantitative influence of contact friction on the compressive strength of concrete and the corresponding size effect under uniaxial compression. The concrete mesoscale concretization model (CMCM) is established to consider the heterogeneity of meso-components based on the statistical distribution and local spatial correlation theory. The interaction between concrete and steel loading platens is evaluated by defining the contact friction behavior. The uniaxial compression behavior of concrete with different cross-section diameters, height-diameter ratios, and friction coefficients is simulated to analyze the quantitative effect of contact friction. The numerical results show that the hoop effect caused by contact friction constrains the lateral deformation and damage initiation at the loading boundaries of concrete, thus increasing the compressive strength; when the friction coefficient μ = 0 , the slight size effect is mainly caused by the wall effect, while when the friction coefficient μ > 0 , the severe size effect is primarily driven by the contact friction constraint; increasing the friction coefficient improves the sensitivity of compressive strength to sample size, making the size effect more pronounced. The Size Effect Law considering the diameter, height-diameter ratio and friction coefficient (DHF-SEL) is proposed based on the classical Bažant size effect law and CMCM, and then verified with the numerical results and experimental data.