Riyad as-Salihin, Book 9, Hadith 1219 (In-Book)

Abu Hurairah (May Allah be pleased with him) reported: The Prophet said, "He who observes fasting during the month of Ramadan with Faith while seeking its reward from Allah, will have his past sins forgiven."[Al-Bukhari and Muslim].

وعن أبي هريرة رضي الله عنه عن النبي صلى الله عليه وسلم قال‏:‏ من صام رمضان إيمانًا واحتسابًا، غفر له ما تقدم من ذنبه ‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏

sunnah.com