We study the variation of the gravitational Newton's constant on cosmological scales in scalar-tensor theories of gravity. We focus on the simplest models of scalar-tensor theories with a coupling to the Ricci scalar of the form F (σ) = N 2 pl + ξσ 2 , such as extended Jordan-Brans-Dicke (N pl = 0), or a non-minimally coupled scalar field with N pl = M pl , which permits the gravitational constant to vary self-consistently in time and space. In addition, we allow the gravitational constant to differ from the Newton's constant G, i.e. G eff (z = 0) = G (1 + ∆) 2 . We study the impact of this imbalance ∆ jointly with the coupling ξ into anisotropies of the cosmic microwave background and matter power spectrum at low-redshift. Combining the information from Planck 2018 CMB temperature, polarization and lensing, together with a compilation of BAO measurements from the release DR12 of the Baryon Oscillation Spectroscopic Survey (BOSS), we constrain the imbalance to ∆ = −0.022 ± 0.023 (68% CL) and the coupling parameter to 10 3 ξ < 0.82 (95% CL) for Jordan-Brans-Dicke and for a non-minimally coupled scalar field with F (σ) = M 2 pl + ξσ 2 we constrain the imbalance to ∆ > −0.018 (< 0.021) and the coupling parameter to ξ < 0.089 (ξ > −0.041) both at 95% CL. These constraints correspond to a variation of the gravitational constant now respect to the one in the radiation era to be smaller than 3% (95% CL) and to the ratio of the gravitational Newton's constant measured from cosmological scales and the one measured in a Cavendish-like experiment to be smaller than 4-15% (95% CL). With current data, we observe that the degeneracy between ∆, the coupling ξ to the Ricci scalar, and H 0 allows for a larger value of the Hubble constant increasing the agreement between the distanceladder measurement of the Hubble constant from supernovae type Ia by the SH0ES team and its value inferred by CMB data. We study also how future cosmological observations can constrain the gravitational Newton's constant. Future data such as the combination of CMB anisotropies from LiteBIRD and CMB-S4, and large-scale structures galaxy clustering from DESI and galaxy shear from LSST reduce the uncertainty to σ(∆) 0.004.