Surah An-Naml

27:11

إِلَّا مَن ظَلَمَ ثُمَّ بَدَّلَ حُسْنًۢا بَعْدَ سُوٓءٍۢ فَإِنِّى غَفُورٌۭ رَّحِيمٌۭ

Otherwise, he who wrongs, then substitutes good after evil - indeed, I am Forgiving and Merciful.

Tafsir 27:11

However, whoever wrongs himself by committing a sin, then repents after that, I am Forgiving to him, Merciful to him.