Abu Hurairah reported,

He told them that the Messenger of Allah ﷺ said, "Whoever fasts Ramadan out of faith and seeking reward will have his past sins forgiven, and whoever stands in prayer on Laylat al-Qadr out of faith and seeking reward will have his past sins forgiven."

Muslim 1781

Sahih

و حدثني زهير بن حرب حدثنا معاذ بن هشام حدثني أبي عن يحيى بن أبي كثير قال حدثنا أبو سلمة بن عبد الرحمن أن

أبا هريرة

حدثهم أن رسول الله ﷺ قال من صام رمضان إيمانا واحتسابا غفر له ما تقدم من ذنبه ومن قام ليلة القدر إيمانا واحتسابا غفر له ما تقدم من ذنبه

مسلم 1781صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Travelers' prayer and its shortening
Chapter
Encouragement to observe the night prayer of Ramadan, which is tarawih
Numbering
Darussalam 1781
Muslim 1781