Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Whoever fasts the month of Ramadan due to faith and seeking reward, his previous sins will be forgiven. Whoever stands in prayer during the Night of Decree due to faith and seeking reward, his previous sins will be forgiven.”
Source: Ṣaḥīḥ al-Bukhārī 1901, Ṣaḥīḥ Muslim 760
Grade: Muttafaqun Alayhi (authenticity agreed upon) according to Al-Bukhari and Muslim
عَنْ أَبِي هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ
1901 صحيح البخاري كتاب الصوم باب من صام رمضان إيمانا واحتسابا ونية
760 صحيح مسلم كتاب صلاة المسافرين وقصرها باب الترغيب في قيام رمضان وهو التراويح