International audienceThe Optical Constants database (ocdb.smce.nasa.gov) came online in February 2023 and provides complex refractive indices of laboratory-generated organic refractory materials and ices relevant to (exo)planetary and astrophysical environments. The goal of the OCdb is to centralize published optical constants data to facilitate both their access by the scientific community and their use to analyze observational data returned by space missions and ground-based observatories. Computational tools are also under development to facilitate scientific use of the available OCdb optical constants data sets. Investigators generating laboratory optical constants are therefore encouraged to contribute their data to OCdb in order to increase the availability of their data and to enhance the scientific effectiveness of the database. Optical constants are critical input parameters in models (e.g., radiative transfer, atmospheric, and reflectance spectral models) that are used to simulate the absorption, reflection, and scattering of light due to solid materials present in planetary and astrophysical environments (planets, their satellites, exoplanets, asteroids, comets, protoplanetary disks, etc.), and are key to the compositional interpretation of observations. We will first present the infrastructure of the OCdb and show how to use and contribute to it. We will introduce the two large NASA projects, namely, the Laboratory Astrophysics Directed Work Package and the NASA Center for Optical Constants, that have been instrumental in (i) developing the OCdb, (ii) generating planetary- and astrophysics-relevant ices and organic refractory materials from gas and ice irradiation in the laboratory, and (iii) determining their optical constants for inclusion in OCdb. We will also present two studies that are making use of these optical constants to interpret observations of Titan's atmosphere and Pluto's surface. These studies show the importance of measuring optical constants of laboratory-generated materials, and their impact on the models used to analyze and interpret astronomical observations. These studies also demonstrate the essential role of such a database and the need for optical constants of a broad range of materials and wavelengths to enable the scientific community and to maximize the scientific return from space missions (e.g., Cassini, New Horizons, SOFIA, JWST)