  Given a critical quantum spin chain with a microscopic Lie-group symmetry,
corresponding e.g. to $U(1)$ or $SU(2)$ spin isotropy, we numerically
investigate the emergence of Kac-Moody symmetry at low energies and long
distances. In that regime, one such critical quantum spin chain is described by
a conformal field theory where the usual Virasoro algebra associated to
conformal invariance is augmented with a Kac-Moody algebra associated to
conserved currents. Specifically, we first propose a method to construct
lattice operators corresponding to the Kac-Moody generators. We then
numerically show that, when projected onto low energy states of the quantum
spin chain, these operators indeed approximately fulfill the Kac-Moody algebra.
The lattice version of the Kac-Moody generators allow us to compute the
so-called level constant and to organize the low-energy eigenstates of the
lattice Hamiltonian into Kac-Moody towers. We illustrate the proposal with the
XXZ model and the Heisenberg model with a next-to-nearest-neighbor coupling.
