"Abu Hurairah told me that the Messenger of Allah said: 'Whoever spends the nights of Ramadan in prayer (Qiyam) out of faith and in the hope of reward, he will be forgiven his previous sins, and whoever spends the night of Lailat Al-Qadr in prayer out of faith and in the hope of reward, he will be forgiven his previous sins."' (Using translation from Nasāʾī 2206)
قَالَ رَسُولُ اللهِ ﷺ مَنْ صَامَ رَمَضَانَ وَقَامَهُ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ وَمَنْ قَامَ لَيْلَةَ الْقَدْرِإِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ