A search is performed for the central exclusive production of pairs of charmonia produced in proton-proton collisions. Using data corresponding to an integrated luminosity of 3 fb(-1) collected at centre-of-mass energies of 7 and 8 TeV, J/psi J/psi and J/psi psi (2S) pairs are observed, which have been produced in the absence of any other activity inside the LHCb acceptance that is sensitive to charged particles in the pseudorapidity ranges (-3.5,-1.5) and (1.5, 5.0). Searches are also performed for pairs of P-wave charmonia and limits are set on their production. The cross-sections for these processes, where the dimeson system has a rapidity between 2.0 and 4.5, are measured to be sigma (J/psi J/psi) = 58 +/- 10(stat) +/- 6(syst) pb, sigma(J/psi psi(2S)) = 63(-18)(+27)(stat) +/- 10(syst) pb, sigma(psi(2S)psi(2S)) < 237 pb, sigma(chi)(chi)(C0)(C0) < 69 nb, sigma(chi)(chi)(C1)(C1) < 45 pb, sigma(chi)(chi)(C2)(C2) < 141 pb, where the upper limits are set at the 90% confidence level. The measured J/psi J/psi and J/psi psi (2S) cross-sections are consistent with theoretical expectations.