We present the Yale Stocks and Flows Database (YSTAFDB), which comprises most of the material stocks and flows (STAF) data generated at the Center for Industrial Ecology at Yale University since the early 2000s. These data describe material cycles, criticality, and recycling in terms of 62 elements and various engineering materials, e.g., steel, on spatial scales and timeframes ranging from cities to global and the 1800s to ca. 2013. YSTAFDB integrates this diverse collection of STAF data, previously scattered across various non-uniformly formatted electronic files, into a single data structure and file format. Here, we discuss this data structure as well as the usage and formatting of data records in YSTAFDB. YSTAFDB contains 100,000+ data records that are all situated in their systems contexts, with additional metadata included as available. YSTAFDB offers a comprehensive basis upon which STAF data can be accumulated, integrated, and exchanged, and thereby improves their accessibility. Therefore, YSTAFDB facilitates deeper understanding of sustainable materials use and management, which are key goals of contemporary sustainability science.