We calculate the decay branching fractions of the Higgs boson to J/ψ and ηc via the charm-quark fragmentation mechanism for the color-singlet and color-octet states in the framework of non-relativistic QCD. The decay rates are governed by the charm-quark Yukawa coupling, unlike the decay H → J/ψ + γ, which is dominated by the γ∗-J/ψ mixing. We find that the decay branching fractions can be about 2×10−5 for $$ H\to c\overline{c}+J/\psi $$
H
→
c
c
¯
+
J
/
ψ
, and 6 × 10−5 for $$ H\to c\overline{c}+{\eta}_c $$
H
→
c
c
¯
+
η
c
. We comment on the perspective of searching for the Higgs boson to J/ψ transition at the High-Luminosity LHC for testing the charm-quark Yukawa coupling.