The ratio of production cross-sections of ψ(2S) over J/ψ mesons as a function of charged-particle multiplicity in proton-proton collisions at a centre-of-mass energy $$ \sqrt{s} $$
s
= 13 TeV is measured with a data sample collected by the LHCb detector, corresponding to an integrated luminosity of 658 pb−1. The ratio is measured for both prompt and non-prompt ψ(2S) and J/ψ mesons. When there is an overlap between the rapidity ranges over which multiplicity and charmonia production are measured, a multiplicity-dependent modification of the ratio is observed for prompt mesons. No significant multiplicity dependence is found when the ranges do not overlap. For non-prompt production, the ψ(2S)-to-J/ψ production ratio is roughly independent of multiplicity, irrespective of the rapidity range over which the multiplicity is measured. The results are compared to predictions of the co-mover model and agree well except in the low multiplicity region. The ratio of production cross-sections of ψ(2S) over J/ψ mesons are cross-checked with other measurements in di-lepton channels and found to be compatible.