Sayyiduna Salamah bin Nufayl (may Allah be pleased with him) narrates: A young man came and stood before the Messenger of Allah (peace and blessings be upon him) and said in his loudest voice: O Messenger of Allah, what do you say about a person who has left no evil deed undone but has committed it, and no sin but has perpetrated it, and no share or anything greater has come within his reach but he has seized it through his oath; a person whose sins, if they were distributed among the people of Madinah, would overwhelm them? The Prophet (peace and blessings be upon him) asked: "Have you accepted Islam?" or he said: "Are you a Muslim?" He said: As for me, I bear witness that there is no true god except Allah, and that Muhammad (peace and blessings be upon him) is the Messenger of Allah. He (peace and blessings be upon him) said: "Go, for Allah has changed your evil deeds into good deeds." He said: O Messenger of Allah, and my betrayals and my acts of wickedness too? He (peace and blessings be upon him) said: "Your betrayals and your acts of wickedness too" - he said it three times. So the young man turned away saying: Allahu akbar (Allah is the Greatest), and I kept hearing him say the takbir until he disappeared from my sight.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6332