We study the spectral evolution on second and subsecond time-scales in 11 long and 12 short gamma-ray bursts (GRBs) with peak flux >8.5 × 10−6 erg cm−2 s (8 keV–35 MeV) detected by the Fermi satellite. The peak flux correlates with the time-averaged peak energy in both classes of bursts. The peak energy evolution, as a function of time, tracks the evolution of the flux on short time-scales in both short and long GRBs. We do not find evidence of a hard-to-soft spectral evolution. While short GRBs have observed peak energies larger than few MeV during most of their evolution, long GRBs can start with a softer peak energy (of few hundreds keV) and become as hard as short ones (i.e. with Eobspeak larger than few MeV) at the peak of their light curve. Six GRBs in our sample have a measured redshift. In these few cases we find that their correlations between the rest frame Epeak and the luminosity Liso are less scattered than their correlations in the observer frame between the peak energy Eobspeak and the flux P. We find that the rest frame Epeak of long bursts can be as high or even larger than that of short GRBs and that short and long GRBs follow the same Epeak(t)–Liso(t) correlation, despite the fact that they likely have different progenitors.