Whoever has wronged his own soul by committing sins and acts of disobedience then repents correctly in the manner prescribed by the Legislation with the necessary prerequisites, by immediately discontinuing the sins, regretting having committed them, and resolving never to commit them again, then the necessary prerequisites have been fulfilled and the sins will be wiped away. In fact, Allaah’s Bounty is even greater than that! These sins will be changed into good deeds, as found in the aayah in Soorah Al-Furqaan,
(إِلَّا مَن تَابَ وَءَامَنَ وَعَمِلَ عَمَلًۭا صَـٰلِحًۭا فَأُو۟لَـٰٓئِكَ يُبَدِّلُ ٱللَّهُ سَيِّـَٔاتِهِمْ حَسَنَـٰتٍۢ ۗ وَكَانَ ٱللَّهُ غَفُورًۭا رَّحِيمًۭا)
“Except for those who repent, believe, and do righteous work. For them Allah will replace their evil deeds with good. And ever is Allah Forgiving and Merciful.” (Al-Furqaan 70)
In fact, a great deal of scholars– including Shaykhu-l-Islaam, and he prefers this view– hold that these good deeds which have been exchanged from bad deeds will be multiplied just like the initially performed good deeds are. A hypothetical situation would be if two people both died at the age of seventy; one of them was continually obedient from his childhood until his death while the other lived a life of sins and transgression then repented toward the end of his life. Would they be equal? According to this view– that the sins and acts of disobedience were changed into good deeds then multiplied– they could be equal. Another group of scholars differ with this opinion, and this appears more in accordance with the divine wisdom, the praise of those who do not engage in childish pursuits during their youth, and the general principle stating that the alternate takes the same ruling as the original, such that sins would not be multiplied and, therefore, the good deeds which replaced the original sins would not be multiplied. This shows the clear difference between those who lived as believers and those who lived as sinners and that they are not equal, as Allaah says,
(أَفَمَن كَانَ مُؤْمِنًۭا كَمَن كَانَ فَاسِقًۭا ۚ لَّا يَسْتَوُۥنَ)
“Is the one who is a believer equal before Allaah to the one who is rebellious? They are not equal!” (As-Sajdah 18)
Thus, these sins would be wiped away, and the sinner may even have to answer for them, but when he sees that they have been exchanged for good deeds he will become overjoyed, and this is from the bliss which he will encounter in the Afterlife.