Abu Tawil Shatab Mamdud reported,

A man came to the Messenger of Allah ﷺ and said, "Tell me about a man who has committed every sin, leaving none undone, and along with that has not left any matter great or small without indulging in it. Is there any repentance for him?"The Messenger of Allah ﷺ asked, "Have you embraced Islam?"The man replied, "As for me, I bear witness that there is no god but Allah alone, with no partner, and that you are the Messenger of Allah."He said, "Yes. Do good deeds and abandon evil ones, and Allah will turn them all into good deeds for you."The man asked, "Even my treacheries and my immoralities?"He said, "Yes."The man exclaimed, "Allah is the Greatest!" And he kept proclaiming Allah's greatness until he disappeared from sight.

Azami 11458

Sahih

عن أبي طويل شطب الممدود

أنه أتى رسول الله ﷺ فقال: أرأيت رجلا عمل الذنوب كلها فلم يترك منها شيئا وهو في ذلك لم يترك حاجة ولا داجة إلا أتاها فهل له من توبة؟ قال: فهل أسلمت؟ قال: أما أنا فأشهد أن لا إله إلا الله وحده لا شريك له وأنك رسول الله قال: نعم تفعل الخيرات وتترك السيئات فيجعلهن الله لك خيرات كلهن قال: وغدراتي وفجراتي؟ قال: نعم فقال: الله أكبر فما زال يكبر حتى توارى.

الأعظمي 11458صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Repentance and seeking forgiveness
Chapter
Comprehensive and general supplications
Section
Whoever embraces Islam, Allah will change his evil deeds into good deeds on the Day of Resurrection
Numbering
Jami al-Kamil 11458 (2nd edition)
Azami 11458