The inclusive production cross sections at forward rapidity of [Formula: see text], [Formula: see text], [Formula: see text](1S) and [Formula: see text](2S) are measured in [Formula: see text] collisions at [Formula: see text] with the ALICE detector at the LHC. The analysis is based on a data sample corresponding to an integrated luminosity of 1.35 pb[Formula: see text]. Quarkonia are reconstructed in the dimuon-decay channel and the signal yields are evaluated by fitting the [Formula: see text] invariant mass distributions. The differential production cross sections are measured as a function of the transverse momentum [Formula: see text] and rapidity [Formula: see text], over the ranges [Formula: see text] GeV/c for [Formula: see text], [Formula: see text] GeV/c for all other resonances and for [Formula: see text]. The measured cross sections integrated over [Formula: see text] and [Formula: see text], and assuming unpolarized quarkonia, are: [Formula: see text] [Formula: see text]b, [Formula: see text] [Formula: see text]b, [Formula: see text] nb and [Formula: see text] nb, where the first uncertainty is statistical and the second one is systematic. The results are compared to measurements performed by other LHC experiments and to theoretical models.