This paper presents the complete QED contribution to the electron g-2 up to the tenth order. With the help of the automatic code generator, we have evaluated all 12672 diagrams of the tenth-order diagrams and obtained 9.16 (58)(\alpha/\pi)^5. We have also improved the eighth-order contribution obtaining -1.9097(20)(\alpha/\pi)^4, which includes the mass-dependent contributions. These results lead to a_e(theory)=1 159 652 181.78 (77) \times 10^{-12}. The improved value of the fine-structure constant \alpha^{-1} = 137.035 999 174 (35) [0.25 ppb] is also derived from the theory and measurement of a_e.