We compute the integral Picard group of the moduli stack of polarized K3 surfaces of fixed degree whose singularities are at most rational double points. We also compute the integral Picard group of the stack of quasi-polarized K3 surfaces, and of the stacky period domain.