The production of π±, K ±, KS0, K ∗(892) , p , ϕ(1020) , Λ , Ξ -, Ω -, and their antiparticles was measured in inelastic proton–proton (pp) collisions at a center-of-mass energy of s = 13 TeV at midrapidity (| y| < 0.5) as a function of transverse momentum (pT) using the ALICE detector at the CERN LHC. Furthermore, the single-particle pT distributions of KS0, Λ , and Λ ¯ in inelastic pp collisions at s=7 TeV are reported here for the first time. The pT distributions are studied at midrapidity within the transverse momentum range 0 ≤ pT≤ 20 GeV/c, depending on the particle species. The pT spectra, integrated yields, and particle yield ratios are discussed as a function of collision energy and compared with measurements at lower s and with results from various general-purpose QCD-inspired Monte Carlo models. A hardening of the spectra at high pT with increasing collision energy is observed, which is similar for all particle species under study. The transverse mass and xT≡2pT/s scaling properties of hadron production are also studied. As the collision energy increases from s = 7–13 TeV, the yields of non- and single-strange hadrons normalized to the pion yields remain approximately constant as a function of s, while ratios for multi-strange hadrons indicate enhancements. The pT-differential cross sections of π±, K ± and p (p ¯) are compared with next-to-leading order perturbative QCD calculations, which are found to overestimate the cross sections for π± and p (p ¯) at high pT.