Viscosity measurements in combination with pulsed magnetic fields are developed by use of a quartz-crystal microbalance (QCM). When the QCM is immersed in liquid, the resonant frequency, $f_0$, and the quality factor, $Q$, of the QCM change depending on $(rhoeta)^{0.5}$, where $rho$ is the mass density and $eta$ the viscosity. During the magnetic-field pulse, $f_0$ and $Q$ of the QCM are simultaneously measured by a ringdown technique. The typical resolution of $(rhoeta)^{0.5}$ is 0.5 %. As a benchmark, the viscosity of liquid oxygen is measured up to 55 T.