ENOfficial
It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said: ‘Whoever fasts Ramadan out of faith and the hope of reward will be forgiven his previous sins.”
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ: قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ " مَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ " .
sunnah.com