Abu Hurairah reported,

The Prophet ﷺ said, "Whoever fasts Ramadan..." In Qutayba's version of the hadith, the Prophet ﷺ said, "Whoever stands in prayer during the month of Ramadan out of faith and seeking reward, his previous sins will be forgiven, and whoever stands in prayer on Laylat al-Qadr out of faith and seeking reward, his previous sins will be forgiven."

Nasai 2204

Sahih

أخبرنا قتيبة ومحمد بن عبد الله بن يزيد قالا حدثنا سفيان عن الزهري عن أبي سلمة

عن أبي هريرة

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

النسائي 2204صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Fasting
Chapter
Reward for whoever observed Ramadan in prayer and fasted it out of faith and seeking reward, and the difference of opinion regarding Zuhri concerning the report about that
Numbering
Darussalam 2204
Nasai 2204