The wetlands along the Yangtze River Basin (YRB) have provided a variety of ecological and economic benefits. However, the lack of a long-term wetland classification dataset with comprehensive wetland categories has created in a barrier to evaluating the long-term variations of YRB wetlands for their habitat health, carbon storage, greenhouse gas emissions, and ecosystem service capacity. Therefore, this study aimed to generate a wetland classification dataset for the YRB covering the time period from 1984 to 2021. The dataset named Long-Term Wetland Classification Dataset for YRB (LTWCD_YRB) was created using a Random Forest machine learning classifier on Google Earth Engine with 30 m resolution Landsat 5, 7, 8 muti-spectral images. The maps of LTWCD_YRB demonstrated the spatial distribution, annual variability, and seasonal cycle of nine wetland categories in the extent, and the total validation accuracy can reach 85 %. The LTWCD_YRB indicates that the total wetland area of the YRB in 2021 was larger than that in 1984, with a constant increase in human-made wetlands and fluctuating natural wetlands. Aquaculture ponds expanded the most by 4,987 km2, while inland marshes in the source region exhibited the most fluctuations. Seasonal changes in wetlands were prominent in the Poyang Lake Basin, Dongting Lake Basin, and YRB source region. Human activities were found to be more dominant than natural driving forces in affecting wetlands. The LTWCD_YRB offers a consistent agreement of wetland area variations with the other satellite-based wetland datasets in the YRB, making it valuable for researchers, policymakers, and stakeholders to better understand the YRB wetlands and to support sustainable wetland management practices.