We report on the inclusive production cross sec-tions of J/ψ,ψ(2S),Υ(1S),Υ(2S) and Υ(3S), measured at forward rapidity with the ALICE detector in pp colli-sions at a center-of-mass energy√s=8 TeV. The analysis is based on data collected at the LHC and corresponds to an integrated luminosity of 1. 23 pb1. Quarkonia are reconstructed in the dimuon-decay channel. The differen-tial production cross sections are measured as a function ofthe transverse momentum p T and rapidity y, over the p Tranges 0<p T <20 GeV/c for J /ψ,0 < pT<12 GeV/c for all other resonances, and for 2. 5<y<4. The cross sections, integrated over pT and y, and assuming unpolarized quarkonia, are σJ/ψ=8. 98 ±0. 04±0. 82μb,σψ(2S)=1.23±0. 08±0.22μb,σΥ(1S)=71±6±7 nb,σΥ(2S)=26±5±4 nb and σΥ(3S)=9±4±1 nb,where the first uncertainty is statistical and the second oneis systematic. These values agree, within at most 1. 4σ, withmeasurements performed by the LHCb collaboration in thesame rapidity range.