عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : مَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا ، غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ، وَمَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا ، غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ (بُخاری شریف:۱۹۰۱)
Translation
It is narrated from Hazrat Abu Huraira (R.A) that the Messenger of Allah (ﷺ) said: Whoever stands in worship on Lailat-ul-Qadr with faith and the intention of seeking reward, all his previous sins will be forgiven, and whoever fasts in Ramadan with faith and the intention of reward, all his previous sins will be forgiven.