Hadith 2203

It was narrated from Abu Hurairah that the Prophet said: "Whoever fasts in Ramadan out of faith and in the hope of reward, he will be forgiven his previous sins." '

أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ مَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏"‏ ‏.‏

Reference: 1122120
In-book reference: Book 22, Hadith 2203
Hadith 2203 - The Book of Fasting - Sunan an-Nasa'i - Sunnah.com