Determining the H2 solubility in model compounds that represent lignocellulose derivatives is valuable for the study of upgrading processes such as hydrodeoxygenation. In this work, γ-heptalactone and γ-nonalactone are studied as model compounds at conditions relevant to hydrodeoxygenation. The solubility of H2 in the lactones was determined in the range of 479 to 582 K and 3 to 10 MPa. The solubility measurements were performed in a continuous flow setup based on the visual observation of the bubble point. Furthermore, the densities of the lactones were measured in order to provide the necessary data for the solubility calculations. The density measurements were performed from 293 to 373 K and from 0.16 to 9.9 MPa in a vibrating tube density meter. Using the measurements, a model of the density as a function of temperature and pressure was developed, obtaining average relative deviations on the order of 0.1%. Similarly, the Peng-Robinson equation of state with the Boston-Mathias modification was used to predict the H2 solubility in the lactones. A temperature-dependent model of the symmetric binary parameter of the equation of state was regressed from the data in order to improve the predictions.