H2SOLV: Fortran solver for diatomic molecules in explicitly correlated exponential basis. We present the Fortran package H2SOLV for an efficient computation of the nonrelativistic energy levels and the wave functions of diatomic two-electron molecules within the Born-Oppenheimer approximation. The wave function is obtained as a linear combination of the explicitly correlated exponential (Ko{l}os-Wolniewicz) functions. The computations of H2SOLV are performed within the arbitrary-precision arithmetics, where the number of working digits can be adjusted by the user. The key part of H2SOLV is the implementation of the algorithm of an efficient computation of the two-center two-electron integrals for arbitrary values of internuclear distances developed by one of us [the first author, “Efficient approach to two-center exponential integrals with applications to excited states of molecular hydrogen”, Phys. Rev. A 88, No. 2, Article ID 022507, 8 p. (2013; url{doi:10.1103/physreva.88.022507})]. This have been one of the long-standing problems of quantum chemistry. The code is parallelized, suitable for large-scale computations limited only by the computer resources available and can produce highly accurate results. As an example, we report several benchmark results obtained with H2SOLV, including the energy value accurate to 18 decimal digits.