The first observation of the decays B(s)0→J/ψpp is reported, using proton-proton collision data corresponding to an integrated luminosity of 5.2fb−1, collected with the \mbox{LHCb}\xspace detector. These decays are suppressed due to limited available phase space, as well as due to Okubo-Zweig-Iizuka or Cabibbo suppression. The measured branching fractions are \begin{align*} \mathcal{B}(B^0 \to J/\psi p \overline{p}) &= (4.51\pm 0.40\; \text{(stat)} \pm 0.44\; \text{(syst)}) \times 10^{-7}, \\ \mathcal{B}(B^0_s \to J/\psi p \overline{p}) &= (3.58\pm 0.19\; \text{(stat)} \pm 0.39\; \text{(syst)}) \times 10^{-6}. \end{align*} For the Bs0 meson, the result is much higher than the expected value of O(10−9). The small available phase space in these decays also allows for the most precise single measurement of both the B0 mass as 5279.74±0.30(stat)±0.10(syst) MeV, and the Bs0 mass as 5366.85±0.19(stat)±0.13(syst) MeV.