Can God forgive someone who committed sex out of marriage? If yes, how? How does the person seek forgiveness for it?
In the Name of Allah, the Most Gracious, the Most Merciful.
Praise be to Allah, Lord of the Worlds. May the peace and blessings of Allah descend on the Prophet Muhammad, his family, his companions, and those who follow them.
Thank you for writing to us.
Of course it is possible for Allah Most High to forgive such a sin. Allah’s forgiveness is vast. He says, “God forgives not that aught should be with Him associated; less than that He forgives to whomsoever He will. Whoso associates with God anything, has indeed forged a mighty sin” (4:48). He also says, “Say: ‘O my people who have been prodigal against yourselves, do not despair of God’s mercy; surely God forgives sins altogether; surely He is the All-forgiving, the All-compassionate’” (39:53-54).
The steps to repentance are as follows:
1. Leaving the sin
2. Feeling remorse
3. Resolving to never go back
[Reliance of the Traveller, p77.0-77.2]
If you take the above steps, with diligence and sincerity, then, Allah willing, you will be forgiven.
I strongly urge you to take every step to change your environment. I do not know whether the situation you found yourself in was adultery or fornication. However, whichever it was, you need to ask yourself how and why you fell into this situation. You also need to set up a support structure so that you are not tempted to fall into this kind of situation again.