The collisionless dynamics of trapped particles in a non-axisymmetric tokamak configuration with toroidal magnetic field ripple is investigated. The resonances between the particle motion and the perturbation are studied with a Hamiltonian description based on action-angle variables. When the ripple exceeds a critical value the particle motion is shown to become stochastic through resonance overlapping mechanisms, and collisionless diffusion occurs. Two regimes are clearly identified: in low ripple regions, the stochastic threshold is given by a standard Chirikov criterion, whereas in higher ripple zones the motion is dominated by the perturbation structure around the resonances. Critical ripple values and diffusion coefficients are analytically determined in both regimes, and the case of 3.5 MeV alpha particles in a reactor size tokamak such as ITER is discussed.