Sahih al-Bukhari 1901
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَنْ قَامَ لَيْلَةَ الْقَدْرِ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ، وَمَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ "
Narrated Abu Huraira:
The Prophet (ﷺ) said, "Whoever established prayers on the night of Qadr out of sincere faith and hoping for a reward from Allah, then all his previous sins will be forgiven; and whoever fasts in the month of Ramadan out of sincere faith, and hoping for a reward from Allah, then all his previous sins will be forgiven."
Full reference and source
Sahih al-Bukhari 1901 In-book : Book 30, Hadith 11 USC-MSA web (English) : Vol. 3, Book 31, Hadith 125 (deprecated)
View source on Sunnah.com (opens in a new tab)