ABSTRACT We determine the mass functions (MFs) and the dynamical parameters of 15 nearby open clusters (OCs), using the unprecedented data set of the Gaia Early Data Release 3. We select the members of each cluster by combining the photometric (colour and magnitude) and astrometric (parallax and proper motions) parameters of stars, minimizing the contamination from Galactic field interlopers. By comparing the observed distribution of stars along the cluster main sequence with the best-fitting synthetic population, we find the present-day MF and the binary fraction of the OCs, along with their dynamical parameters like mass, half-mass radius, and half-mass relaxation time. We found that the global present-day MF of OCs are consistent with a single power-law function, F(m) ∝ mα, with slopes −3 < α < −0.6 including both subsolar, 0.2 < m/M⊙ < 1, and supersolar mass regimes. A significant correlation between the MF slope and the ratio of age to half-mass relaxation time is evidenced, similarly to the same conclusion already observed among Galactic globular clusters. However, OCs evolve along different tracks in comparison with the globular clusters, possibly indicating primordial differences in their initial mass function (IMF). The comparison with Monte Carlo simulations suggests that all the analysed OCs could be born with an IMF with slope αIMF < −2.3. We also show that the less evolved OCs have an MF consistent with that of the solar neighbourhood, indicating a possible connection between the dissolution of OCs and the formation of the Galactic disc.