The invariant differential cross sections for inclusive [Formula: see text] and [Formula: see text] mesons at midrapidity were measured in pp collisions at [Formula: see text] TeV for transverse momenta [Formula: see text] GeV/c and [Formula: see text] GeV/c, respectively, using the ALICE detector. This large range in [Formula: see text] was achieved by combining various analysis techniques and different triggers involving the electromagnetic calorimeter (EMCal). In particular, a new single-cluster, shower-shape based method was developed for the identification of high-[Formula: see text] neutral pions, which exploits that the showers originating from their decay photons overlap in the EMCal. Above 4 GeV/[Formula: see text], the measured cross sections are found to exhibit a similar power-law behavior with an exponent of about 6.3. Next-to-leading-order perturbative QCD calculations differ from the measured cross sections by about 30% for the [Formula: see text], and between 30-50% for the [Formula: see text] meson, while generator-level simulations with PYTHIA 8.2 describe the data to better than 10-30%, except at [Formula: see text] GeV/[Formula: see text]. The new data can therefore be used to further improve the theoretical description of [Formula: see text] and [Formula: see text] meson production.