The production of J/psi and psi (2S) was studied with the ALICE detector in Pb-Pb collisions at the LHC. The measurement was performed at forward rapidity (2.5 <y <4) down to zero transverse momentum (p(T)) in the dimuon decay channel. Inclusive J/psi yields were extracted in different centrality classes and the centrality dependence of the average p(T) is presented. The J/psi suppression, quantified with the nuclear modification factor (R-AA), was measured as a function of centrality, transverse momentum and rapidity. Comparisons with similar measurements at lower collision energy and theoretical models indicate that the J/psi production is the result of an interplay between color screening and recombination mechanisms in a deconfined partonic medium, or at its hadronization. Results on the psi(2S) suppression are provided via the ratio of psi(2S) over J/psi measured in pp and Pb-Pb collisions.