Forgiveness for All Previous Sins
A person need not despair from the mercy of God in regards to the sins one may have committed in their life, for indeed God, The Most Forgiving and Merciful, is able to forgive all sins.
When someone converts to Islam, God forgives all of his previous sins and evil deeds. A man called Amr came to the Prophet Muhammad, may the mercy and blessings of God be upon him, and said, â€śGive me your right hand so that I may give you my pledge of loyalty.â€ť The Prophet stretched out his right hand. Amr withdrew his hand. The Prophet said: â€śWhat has happened to you, O Amr?â€ť He replied, â€śI intend to lay down a condition.â€ť The Prophet asked: â€śWhat condition do you intend to put forward?â€ť Amr said, â€śThat God forgive my sins.â€ť The Prophet, may the mercy and blessings of God be upon him, said: â€śDidnâ€™t you know that converting to Islam erases all previous sins?â€ť
After converting to Islam, the person will be rewarded for his or her good and bad deeds according to the following saying of the Prophet Muhammad: â€śYour Lord, Who is blessed and exalted, is most merciful. If someone intends to do a good deed but does not do it, a good deed will be recorded for him. And if he does do it, (a reward of) ten to seven hundred or many more times (the reward of the good deed), will be recorded for him. And if someone intends to do a bad deed but does not do it, a good deed will be recorded for him. And if he does do it, a bad deed will be recorded against him or God will wipe it out.â€ť
 Narrated in Saheeh Muslim, #121, and Mosnad Ahmad, #17357.
 Narrated in Mosnad Ahmad, #2515, and Saheeh Muslim, #131.
Source: islamreligion.com [External/non-QP]