We consider the effect of nonmagnetic and magnetic impurities on the superheating field $H_s$ in a type-II superconductor. We solved the Eilenberger equations, which take into account the nonlinear pairbreaking of Meissner screening currents, and calculated $H_s(T)$ for arbitrary temperatures and impurity concentrations in a single-band s-wave superconductor with a large Ginzburg-Landau parameter. At low temperatures nonmagnetic impurities suppress a weak maximum in $H_s(T)$ which has been predicted for the clean limit, resulting instead in a maximum of $H_s$ as a function of impurity concentration in a moderately clean limit. It is shown that nonmagnetic impurities weakly affect $H_s$ even in the dirty limit, while magnetic impurities suppress both $H_s$ and the critical temperature $T_c$. The density of quasiparticles states $N(epsilon)$ is strongly affected by an interplay of impurity scattering and current pairbreaking. We show that a clean superconductor at $H=H_s$ is in a gapless state, but a quasiparticle gap $epsilon_g$ in $N(epsilon)$ at $H=H_s$ appears as the concentration of nonmagnetic impurities increases. As the nonmagnetic scattering rate $alpha$ increases above $alpha_c=0.36$, the quasiparticle gap $epsilon_g(alpha)$ at $H=H_s$ increases, approaching $epsilon_gapprox 0.32Delta_0$ in the dirty limit $alphagg 1$, where $Delta_0$ is the superconducting gap parameter at zero field. The effects of impurities on $H_s$ can be essential for the nonlinear surface resistance and superconductivity breakdown by strong RF fields.