We prove the edge universality of the beta ensembles for any $betage 1$, provided that the limiting spectrum is supported on a single interval, and the external potential is $mathscr{C}^4$ and regular. We also prove that the edge universality holds for generalized Wigner matrices for all symmetry classes. Moreover, our results allow us to extend bulk universality for beta ensembles from analytic potentials to potentials in class $mathscr{C}^4$.