Abu Hurairah reported,

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."

Azami 4636

Sahih

عن أبي هريرة، قال

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

الأعظمي 4636صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Night prayer in Ramadan
Section
Encouragement to pray at night in Ramadan
Numbering
Jami al-Kamil 4636 (2nd edition)
Azami 4636