Consider a nonlinear Klein-Gordon equation on the unit circle, with smooth data of size (...). A solution u which, for any (...), may be extended as a smooth solution on a time-interval (...) for some Ck > 0 and for (...), is called an almost global solution. It is known that when the nonlinearity is a polynomial depending only on u, and vanishing at order at least 2 at the origin, any smooth small Cauchy data generate, as soon as the mass parameter in the equation stays outside a subset of zero measure of (...)+, an almost global solution, whose Sobolev norms of higher order stay uniformly bounded. The goal of this paper is to extend this result to general Hamiltonian quasi-linear nonlinearities. These are the only Hamiltonian non linearities that depend not only on u, but also on its space derivative. To prove the main theorem, we develop a Birkhoff normal form method for quasi-linear equations.