The ratio between the B+c→J/ψτ+ντ and B+c→J/ψμ+νμ branching fractions is measured using a data sample of proton-proton collisions collected by CMS at a center-of-mass energy of 13 TeV in the years 2016–2018 and corresponding to an integrated luminosity of 138 fb−1. The J/ψ meson is identified through its J/ψ →μ+μ− decay and the tau lepton is reconstructed in the hadronic three-prong final state. The measured ratio of branching fractions in this tau decay mode, Rhad J/ψ =1.04+0.50 −0.44, is combined with the previous analysis based on the τ+→μ+νμ ̄ν
τ leptonic decay channel, leading to RJ/ψ =0.49±0.26. As this result is consistent with the standard model prediction of 0.258 ±0.004, no evidence of lepton flavor universality violation is found.