We present a complete study of small nonlinear vibrations of a swinging spring with a nonlinear dependence of the spring tension on its elongation. We use the Hamiltonian normal form method. The Hamiltonian normal form profitably differs from the general normal form of differential equations, because it has an additional integral. To reduce the Hamiltonian to normal form, we use the invariant normalization method, which significantly reduces the computations. The normal form asymptotics are obtained by successively calculating the quadratures in the same way for both resonance and nonresonance cases. The solutions of Hamiltonian equations in normal form showed that the periodic change of vibrations from vertical to horizontal modes and vice versa occurs only in the case of 1:1 and 2:1 resonances. In the case of 2:1 resonance, this effect manifests itself in the quadratic terms of the equation, and in the case of 1:1 resonance, it manifests itself if the cubic terms are taken into account. In all other cases, both in the case of resonance and without any resonance, the vibrations occur at two constant frequencies, which slightly differ from the linear approximation frequencies. In the case of 2:1 resonance, we found the maximum frequency detuning at which the effect of the energy pumping from one vibration mode to another disappears. 1:1 resonance is physically possible only for a spring with a negative cubic additional term in the strain law.