Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:3:89

Except for those who repent after that and correct themselves. For indeed, Allah is Forgiving and Merciful.  

But those who repent thereafter, and make amends, in their actions, then truly God is Forgiving, Merciful, to them.
القرآن:٣:٨٩

إِلَّا الَّذِينَ تَابُوا مِنْ بَعْدِ ذَٰلِكَ وَأَصْلَحُوا فَإِنَّ اللَّهَ غَفُورٌ رَحِيمٌ  

{إلا الذين تابوا من بعد ذلك وأصلحوا} عملهم {فإن الله غفور} لهم {رحيم} بهم.

See similar narrations below:

Collected by Qurʾān
quran:5:39

But whoever repents after his wrongdoing and reforms, indeed, Allah will turn to him in forgiveness. Indeed, Allah is Forgiving and Merciful.  

But whoever repents after his evildoing, refrains from theft, and amends, his actions, God will relent to him. God is indeed Forgiving, Merciful, in expressing what has been stated. However, the rights of the victim to have the penalty of amputation carried out and his property restored are not ˹automatically˺ forgone after repentance. In fact, as is clarified in the Sunna, only if he is pardoned before being taken to the Imam is the ˹punishment of˺ amputation waived, and al-Shāfi‘ī is of this opinion.
القرآن:٥:٣٩

فَمَنْ تَابَ مِنْ بَعْدِ ظُلْمِهِ وَأَصْلَحَ فَإِنَّ اللَّهَ يَتُوبُ عَلَيْهِ ۗ إِنَّ اللَّهَ غَفُورٌ رَحِيمٌ  

{فمن تاب من بعد ظلمه} رجع عن السرقة {وأصلح} عمله {فإن الله يتوب عليه إن الله غفور رحيم} في التعبير بهذا ما تقدم فلا يسقط بتوبته حق الآدمي من القطع ورد المال نعم بيَّنت السنة أنه إن عفا عنه قبل الرفع إلى الإمام سقط القطع وعليه الشافعي.
quran:24:5

Except for those who repent thereafter and reform, for indeed, Allah is Forgiving and Merciful.  

except those who repent thereafter and make amends, in their deeds, for God is indeed Forgiving, of their ˹unsubstantiated˺ accusations, Merciful, to them, in inspiring them to make repentance whereby their immorality is curbed and their testimony becomes ˹once again˺ acceptable — some say, however, that it can never be accepted ˹thereafter˺, if the proviso is taken to refer to the last clause.
القرآن:٢٤:٥

إِلَّا الَّذِينَ تَابُوا مِنْ بَعْدِ ذَٰلِكَ وَأَصْلَحُوا فَإِنَّ اللَّهَ غَفُورٌ رَحِيمٌ  

{إلا الذين تابوا من بعد ذلك وأصلحوا} عملهم {فإن الله غفور} لهم قذفهم {رحيم} بهم بإلهامهم التوبة فيها ينتهي فسقهم وتقبل شهادتهم وقيل لا تقبل رجوعا بالاستثناء إلى الجملة الأخيرة.