Hadith on Dua: Supplication for entering, leaving Masjid

Abu Usayd reported: The Messenger of Allah, peace and blessings be upon him, said, “When one of you enters the mosque, let him say: O Allah, open for me the doors of your mercy. When he leaves, let him say: O Allah, I ask you for your favor.”

Source: Ṣaḥīḥ Muslim 713

Grade: Sahih (authentic) according to Muslim

عَنْ أَبِي أُسَيْدٍ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ أَحَدُكُمْ الْمَسْجِدَ فَلْيَقُلْ اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ وَإِذَا خَرَجَ فَلْيَقُلْ اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ

713 صحيح مسلم كتاب صلاة المسافرين وقصرها باب ما يقول إذا دخل المسجد