The recent detection of γ-ray emission from four radio-loud narrow-line Seyfert 1 galaxies suggests that the engine driving the active galactic nuclei (AGN) activity of these objects shares some similarities with that of blazars, namely the presence of a γ-ray emitting, variable jet of plasma closely aligned to the line of sight. In this work we analyse the γ-ray light curves of the four radio-loud narrow-line Seyfert 1 galaxies for which high-energy γ-ray emission has been discovered by Fermi/LAT, in order to study their variability. We find significant flux variability in all the sources. This allows us to exclude a starburst origin of the γ-ray photons and confirms the presence of a relativistic jet. Furthermore, we estimate the minimum e-folding variability time-scale (3–30 d) and infer an upper limit for the size of the emitting region (0.2–2 pc, assuming a relativistic Doppler factor δ= 10 and a jet aperture of θ= 0.1 rad).