We report on the inclusive J / ψ production cross section measured at the CERN Large Hadron Collider in proton–proton collisions at a center-of-mass energy s=13 TeV. The J / ψ mesons are reconstructed in the e +e - decay channel and the measurements are performed at midrapidity (| y| < 0.9) in the transverse-momentum interval 0 < pT< 40 GeV/c, using a minimum-bias data sample corresponding to an integrated luminosity Lint=32.2nb-1 and an Electromagnetic Calorimeter triggered data sample with Lint=8.3pb-1. The pT-integrated J / ψ production cross section at midrapidity, computed using the minimum-bias data sample, is dσ/dy|y=0=8.97±0.24(stat)±0.48(syst)±0.15(lumi)μb. An approximate logarithmic dependence with the collision energy is suggested by these results and available world data, in agreement with model predictions. The integrated and pT-differential measurements are compared with measurements in pp collisions at lower energies and with several recent phenomenological calculations based on the non-relativistic QCD and Color Evaporation models. © 2021, The Author(s).