  We calculate the decay branching fractions of the Higgs boson to $J/\psi$ and
$\eta_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\to J/\psi
+ \gamma$, which is dominated by the $\gamma^*$-$J/\psi$ mixing. We find that
the decay branching fractions can be about $2 \times 10^{-5}$ for $H\to c{\bar
c}+J/\psi$, and $6 \times 10^{-5}$ for $H\to c{\bar c}+\eta_c$. We comment on
the perspective of searching for the Higgs boson to $J/\psi$ transition at the
High-Luminosity LHC for testing the charm-quark Yukawa coupling.
