It is narrated from Sayyiduna Abu Dharr (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him), narrating from his Lord, said: "Allah Almighty said: O son of Adam! As long as you call upon Me and have hope in Me, I will forgive you for what you have done before. O son of Adam! If you come to Me with sins as much as the earth, I will meet you with forgiveness as great as the earth, provided you do not associate anything with Me. O son of Adam! If your sins reach up to the height of the sky and then you seek forgiveness from Me, I will forgive you, and I will not mind."
Hadith Takhrijاس روایت کی سند حسن ہے اور یہ حدیثِ قدسی ہے۔ دیکھئے: [ترمذي 3534] ، [أحمد 167/5، 172، وبعض منه فى مسلم]
Brief Explanation
(Commentary on Hadith 2822)
When a person seeks closeness to Allah Ta'ala through acts of obedience and good deeds, then Allah Ta'ala also draws near to him with mercy and love, forgiveness and pardon. This is a great favor and grace from Allah Ta'ala. And despite a multitude of sins, if a person sincerely repents and seeks forgiveness, then Allah Ta'ala not only forgives his sins, but there is also glad tidings for him: «التَّائِبُمِنَالذَّنْبِكَمَنْلَاذَنْبَلَهُ» However, this does not mean that a person should make sinning his habit, because such a person is deprived of the ability to repent and turn to Allah. Rather, the correct meaning is that if, out of ignorance and heedlessness, a person commits many sins—even if his sins reach up to the heights of the sky—he should not despair of Allah’s mercy, but should repent with sincerity of heart.
«﴿وَيَتُوبَاللّٰهُعَلَىالْمُؤْمِنِينَوَالْمُؤْمِنَاتِوَكَانَاللّٰهُغَفُورًارَحِيمًا﴾ [الأحزاب : 73]» Translation: "And Allah accepts the repentance of believing men and believing women, and Allah is Most Forgiving, Most Merciful."