Abstract Improved uniform error bounds on time-splitting methods are rigorously proven for the long-time dynamics of the weakly nonlinear Dirac equation (NLDE), where the nonlinearity strength is characterized by a dimensionless parameter $\varepsilon \in (0, 1]$. We adopt a second-order Strang splitting method to discretize the NLDE in time, and combine with the Fourier pseudospectral method in space for the full-discretization. By employing the regularity compensation oscillation (RCO) technique, where the high frequency modes are controlled by the regularity of the exact solution, and the low frequency modes are analyzed by phase cancellation and energy method, we establish improved uniform error bounds at $O(\varepsilon ^{2}\tau ^{2})$ and $O(h^{m-1}+ \varepsilon ^{2}\tau ^{2})$ for the second-order Strang splitting semidiscretization and full-discretization up to the long-time $T_{\varepsilon } = T/\varepsilon ^{2}$ with $T>0$ fixed, respectively. Furthermore, the numerical scheme and error estimates are extended to an oscillatory NLDE, which propagates waves with $O(\varepsilon ^{2})$ wavelength in time and at $O(\varepsilon ^{-2})$ wave speed in space. Finally, numerical examples verifying our analytical results are given.