al zumar

Allaah says (interpretation of the meaning):

“Verily, Allaah forgives all sins”

[Surah Al-Zumar :Ayah 53] i.e., for the one who repents.

The Prophet (صلى الله عليه وسلم) said:

“The one who repents from sin is like one who did not sin at all.”

Narrated by Ibn Maajah, 4250; classed as hasan by al-Albaani in Saheeh Ibn Maajah .

The one who repents from sin is like the one who did not sin - Ibn al-Qayyim

The wisdom of Allah, which is based on justice and grace, dictates that the one who repents from sin is like the one who did not sin. Allah, may He be glorified, has guaranteed the one who repents from shirk, murder and zina that he will replace his bad deeds with good deeds. This is a general ruling that applies to everyone who repents from sin.

Allah, may He be exalted, says (interpretation of the meaning):

“Say: O ‘Ibaadi (My slaves) 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” [al-Zumar 39:53]

No sin is excluded from this general meaning, but this applies only to those who repent.

Source: al-Jawaab al-Kaafi, 1/116

وَأَنِيبُوا إِلَى رَبِّكُمْ وَأَسْلِمُوا لَهُ 
And turn in repentance and in obedience with true Faith to your Lord and submit to Him
—  [al-Zumar 39:54]