We derive bounds on the precision of fluctuating currents, which are valid for the steady state of underdamped Langevin dynamics. These bounds provide a generalization of the overdamped thermodynamic uncertainty relation to the finite-mass regime. In the overdamped case, the precision of a current is bounded by the entropy production. By contrast, the underdamped bound acquires two additional positive terms, which characterize the local mean acceleration and the fluctuations of the velocity. We generalize the bound to the cases of a magnetic field and anisotropic temperature, and derive a joint bound for several observables. Finally, we apply our results to biased free diffusion and the Brownian gyrator (with and without magnetic field), as well as to diffusion in periodic potentials. In the latter case, we show that the underdamped bound can be tight when taking into account the correlations between the current and other observables.