A search is presented for narrow resonances decaying to dijet final states in proton–proton collisions at √s=13 TeV using data corresponding to an integrated luminosity of 12.9fb−1. The dijet mass spectrum is well described by a smooth parameterization and no significant evidence for the production of new particles is observed. Upper limits at 95% confidence level are reported on the production cross section for narrow resonances with masses above 0.6TeV. In the context of specific models, the limits exclude string resonances with masses below 7.4TeV, scalar diquarks below 6.9TeV, axigluons and colorons below 5.5TeV, excited quarks below 5.4TeV, color-octet scalars below 3.0TeV, W' bosons below 2.7TeV, Z' bosons below 2.1TeV and between 2.3 and 2.6TeV, and RS gravitons below 1.9TeV. These extend previous limits in the dijet channel. Vector and axial-vector mediators in a simplified model of interactions between quarks and dark matter are excluded below 2.0TeV. The first limits in the dijet channel on dark matter mediators are presented as functions of dark matter mass and are compared to the exclusions of dark matter in direct detection experiments.