Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, states that: “Whoever repents sincerely, Allah accepts his repentance and Allah is Oft-Forgiving, Most Merciful. He has promised the one who repents to Him that He will forgive him his sins. He says: “Say: ‘O My servants who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allah, verily, Allah forgives all sins. Truly, He is Oft?Forgiving, Most Merciful.’” (Az-Zumar: 53) When Allah promises something, He does not break His promise.
And Allah says: “Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allah will change their sins into good deeds, and Allah is Oft?Forgiving, Most Merciful. And whosoever repents and does righteous good deeds; then verily, he repents towards Allah with true repentance.” (Al-Furqan: 70-71) In this verse, Allah tells us that He will replace bad deeds of the one who repents into good deeds, and this is one of the blessings of repentance.
As for the expiation of sins, this is an important matter. Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: The following ten things absolve a person from the punishment for sin:
1 – Repentance: This is agreed upon among Muslims. Allah says: “Say: ‘O My servants who have transgressed against themselves (by committing evil deeds and sins)! Despair not of the Mercy of Allah, verily, Allah forgives all sins. Truly, He is Oft?Forgiving, Most Merciful.’” (Az-Zumar:53); “Know they not that Allah accepts repentance from His slaves and takes the Sadaqaat (alms, charity), and that Allah Alone is the One Who forgives and accepts repentance, Most Merciful?” (At-Tawbah: 104); “And He it is Who accepts repentance from His slaves, and forgives sins…”(Ash-Shura: 25)
2 – Seeking forgiveness: Al-Bukhari and Muslim quote the Prophet, peace and blessings be upon him, as saying: “If a person commits a sin, then says, ‘O Lord, I have committed a sin so forgive me,’ He says, ‘My slave knows that he has a Lord Who may forgive sins or punish for it; I have forgiven My slave…’”

In Sahih Muslim it is narrated that the Prophet, peace and blessings be upon him, said: “If you did not commit sin, Allah would do away with you and bring people who would commit sins then ask Him to forgive them, so He would forgive them.”
3 – Doing good deeds wipe out sins: Allah says: “And perform prayers, at the two ends of the day and in some hours of the night [i.e. the five compulsory Salaah (prayers)]. Verily, the good deeds remove the evil deeds (i.e. small sins)” (Hud: 114)

The Prophet, peace and blessings of Allah be upon him, said: “The five daily prayers and Jumu’ah (Friday prayers) and Ramadan take away the bad deeds between one and the next, if you avoid major sins.” (Reported by Muslim)
“Whoever fasts Ramadan out of faith and the hope of reward, his previous sins will be forgiven.” (Reported by al-Bukhari and Muslim)
“Whoever spends the night of Laylat al-Qadr in prayer out of faith and the hope of reward, his previous sins will be forgiven.” (Reported by al-Bukhari)
“Whoever performs Pilgrimage to this House, and does not behave in an obscene or immoral manner, he will go back free of sin like the day his mother gave birth to him.” (Reported by al-Bukhari)
“The expiation for the fitnah (trial) caused to a man by his family, wealth and children is prayer, fasting, enjoining what is good and forbidding what is evil.” (Reported by al-Bukhari and Muslim)
“Charity extinguishes sin as water extinguishes fire, but hasad (malicious envy) consumes good deeds as fire consumes wood.”
4 – The Du`a’ of the believers for the believer such as when they offer him the funeral prayer:
`A’ishah and Anas ibn Malik quote the Prophet, peace and blessings be upon him, as saying: “There is no Muslim who dies, and a group of Muslims numbering one hundred pray for him, all of them interceding for him, but their intercession for him will be accepted.” (Reported by Muslim)
5 – Good deeds done for the deceased, such as giving to charity (on his behalf), etc.
This will benefit him, according to the clear, authentic texts of the Sunnah and the consensus of Imams. The same applies to Hajj (on his behalf). The Prophet, peace and blessings be upon him, said: “Whoever dies owing any (obligatory) fasts, his heir should fast them on his behalf.” (Reported by al-Bukhari and Muslim)
6 – The intercession of the Prophet, peace and blessings of Allah be upon him, and others on the Day of Resurrection for those who have committed sins.
The Prophet, peace and blessings of Allah be upon him, said: “My intercession will be for those among my Ummah who have committed major sins.” (Classed as Sahih (authentic) by al-Albani in Sahih Abi Dawud)
“I was given the choice between admitting half of my Ummah to Paradise and intercession, and I chose intercession.”
7 – Calamities by means of which Allah expiates sins in this world.
The Prophet, peace and blessings of Allah be upon him, said: “No tiredness, exhaustion, worry, grief, distress or harm befalls a believer in this world, not even a thorn that pricks him, but Allah expiates some of his sins thereby.” (Reported by al-Bukhari and Muslim)
8 – The torment, squeezing and terror that happens in the grave. These are also things by means of which sins are expiated.
9 – The horrors, distress and hardship of the Day of Resurrection.
10 – The mercy and forgiveness of Allah, with no cause on the part of His slaves.
[See: Majmu` Fatawa Ibn Taymiyyah, vol. 7, p. 487-501]

However, every sinner may ask this question, “Do you think that Allah will forgive me?”

Yes, He will, if one has repented sincerely, for Allah has promised to accept repentance, the evidence for which we have mentioned above. One should not despair of Allah’s mercy and remember the story of the man who killed one hundred people, then he repented and Allah accepted his repentance.
This is the story as narrated by Imam Muslim on the authority of Abu Sa`id al-Khudri who quote the Prophet of Allah, peace and blessings of Allah be upon him, as saying: “Among the people who came before you there was a man who killed ninety-nine people, then he asked about the most knowledgeable person in the land. He was told about a monk, so he went to him and said, ‘I have killed ninety-nine people, can I repent?’ The monk said, ‘No.’ So he killed him, thus making the number one hundred. Then he asked about the most knowledgeable person in the land, and he was told about a scholar, so he (went to him and) said: ‘I have killed one hundred people. Can I repent?’ He said, ‘Yes, who could stop you from repenting? Go to such and such a land, where there are people who worship Allah. Worship Allah with them and do not go back to your own land, for it is a bad land.’ So he set out, and when he was half-way there, death came upon him. The angels of mercy and the angels of punishment argued over him. The angels of mercy said, ‘He was coming repentant, turning with his heart towards Allah.’ The angels of punishment said, ‘He never did anything good.’ Then an angel came to them in human form and they accepted him as a mediator. He said, ‘Measure the distance between the two lands, and whichever he is closer to is where be belongs.’ So they measured the distance and found that he was closer to the land to which he was headed, so the angels of mercy took him.”

We learn several things from this Hadith, including the following:
1 – That Allah forgives all the sins of one who repents, no matter how great they are.
2 – The one who repents has to keep away from bad friends who are committing the sin with him. He should keep company with righteous friends who will help him to do good and show him how to do it.

3 – The Muslim must live his life in a state between fear and hope, fearing his sins and not feeling safe from the Plan of Allah, and not being certain that he will enter Paradise. The reason for this is that the Companions of the Prophet, may Allah be pleased with them, even though they were so righteous and pious, were not like this, rather they feared their Lord and worshipped Him with fear and hope. So the Muslim must obey Allah and repent and hope for the mercy of Allah, knowing that Allah forgives and accepts the repentance of the one who repents to Him, so he hopes that Allah will forgive him. He knows that Allah accepts and loves the righteous deeds of His slave, so he strives to do righteous deeds hoping that they will be accepted. If he lives in this state, fearing his sins and hoping for the mercy of his Lord, he will strive to worship Him and keep away from sin, asking Allah to reward him for his righteous deeds until he meets Him when He is pleased with him, and he seeks refuge with Allah from his heart being turned away or his situation changing, as the Prophet, peace and blessings of Allah be upon him, used to pray, “O Controller of the hearts, make my heart steadfast in Your religion.”
We implore Allah to make you and us steadfast in His religion, and bestow more of His bounty upon us, for He is All-Hearing, Ever Near.”