Dua for Entering the Mosque and Leaving It, in Arabic and English
The dua for entering the mosque and the dua for leaving it, in Arabic with an English translation of the meaning, plus the dua for walking to the mosque, which foot to enter and leave with, and the source of each dhikr, from Hisn al-Muslim.

The mosque is a house of Allah, and the Prophet, peace be upon him, taught adhkar for every step of the way to it: walking there, entering and leaving. They turn the trip to the prayer into worship from start to finish. Many Muslims look up the dua for entering the mosque and the dua for leaving it so they can memorise the correct wording.
This article brings the three together: the dua for going to the mosque, the dua for entering it and the dua for leaving it, as they appear in Hisn al-Muslim inside the Athkarak app, each with an English translation of its meaning.
Dua for going to the mosque
Said on the way to the mosque:
اللَّهُمَّ اجْعَلْ فِي قَلْبِي نُوراً، وَفِي لِسَانِي نُوراً، وَفِي سَمْعِي نُوراً، وَفِي بَصَرِي نُوراً، وَمِنْ فَوْقِي نُوراً، وَمِنْ تَحْتِي نُوراً، وَعَنْ يَمِينِي نُوراً، وَعَنْ شِمَالِي نُوراً، وَمِنْ أَمَامِي نُوراً، وَمِنْ خَلْفِي نُوراً، وَاجْعَلْ فِي نَفْسِي نُوراً، وَأَعْظِمْ لِي نُوراً، وَعَظِّم لِي نُوراً، وَاجْعَلْ لِي نُوراً، وَاجْعَلْنِي نُوراً، اللَّهُمَّ أَعْطِنِي نُوراً، وَاجْعَلْ فِي عَصَبِي نُوراً، وَفِي لَحْمِي نُوراً، وَفِي دَمِي نُوراً، وَفِي شَعْرِي نُوراً، وَفِي بَشَرِي نُوراً
Meaning: "O Allah, place light in my heart, light on my tongue, light in my hearing and light in my sight; light above me and light below me, light on my right and light on my left, light in front of me and light behind me; place light in my soul, make light great for me, magnify light for me, make light for me and make me light. O Allah, give me light, and place light in my sinews, in my flesh, in my blood, in my hair and in my skin."
From Hisn al-Muslim. The origin of the hadith is in Sahih al-Bukhari and Sahih Muslim, narrated by Ibn Abbas, may Allah be pleased with him.
The light asked for here is the light of guidance, knowledge and faith by which a believer walks through life.
Dua for entering the mosque
Which foot to enter with
Hisn al-Muslim states that one enters with the right foot first, then says the following.
Seeking refuge from Satan
أَعُوذُ بِاللَّهِ العَظِيمِ، وَبِوَجْهِهِ الْكَرِيمِ، وَسُلْطَانِهِ الْقَدِيمِ، مِنَ الشَّيْطَانِ الرَّجِيمِ
Meaning: "I seek refuge in Allah the Magnificent, in His noble Face and His eternal authority, from Satan the outcast." · Source: Sunan Abi Dawud
Saying Bismillah and sending blessings on the Prophet
بِسْمِ اللَّهِ، وَالصَّلَاةُ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ
Meaning: "In the name of Allah, and blessings and peace be upon the Messenger of Allah." · From Hisn al-Muslim
Asking Allah to open the doors of His mercy
اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ
Meaning: "O Allah, open for me the doors of Your mercy." · Source: Sahih Muslim
Transliteration: Allahumma-ftah li abwaba rahmatik.
Each is said once on entering, in the order given in the book. The believer begins by seeking refuge from Satan before entering the place of worship, mentions the name of Allah, sends blessings and peace on the Messenger, and asks Allah to open the doors of His mercy.
Dua for leaving the mosque
Which foot to leave with
When leaving, one steps out with the left foot first, then says:
بِسْمِ اللَّهِ وَالصّلَاةُ وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ، اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِك، اللَّهُمَّ اعْصِمْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ
Meaning: "In the name of Allah, and blessings and peace be upon the Messenger of Allah. O Allah, I ask You of Your bounty. O Allah, protect me from Satan the outcast."
Said once · From Hisn al-Muslim
In Sahih Muslim, the Prophet, peace be upon him, instructed whoever leaves the mosque to ask Allah of His bounty, which is the phrase in this dua:
اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِك
Meaning: "O Allah, I ask You of Your bounty." Transliteration: Allahumma inni as'aluka min fadlik.
Why mercy on entering and bounty on leaving?
Some scholars explain that the person entering the mosque is turning towards worship and the Hereafter, so asking for mercy suits him, while the person leaving goes out into the world to seek provision, so asking for bounty suits him. Allah says after mentioning the Friday prayer:
﴿فَإِذَا قُضِيَتِ ٱلصَّلَوٰةُ فَٱنتَشِرُوا۟ فِى ٱلْأَرْضِ وَٱبْتَغُوا۟ مِن فَضْلِ ٱللَّهِ﴾
Surah al-Jumu'ah, part of verse 10. Meaning: "Then when the prayer is over, disperse through the land and seek of the bounty of Allah."
Etiquette of the mosque
- Walk to the mosque calmly, saying the dua for going to the mosque on the way.
- Enter with the right foot and leave with the left, as above.
- Pray two rak'ahs before sitting: Sahih al-Bukhari and Sahih Muslim report the Prophet's instruction to do so on entering the mosque. For detailed rulings, such as the times when prayer is discouraged, refer to qualified scholars.
- Say the adhkar after salah before leaving.
Related: what to say when you hear the call to prayer in dua after adhan, and the dua when leaving home.
Read them daily in the Athkarak app
The Athkarak app has the sections "dua for going to the mosque", "dua for entering the mosque" and "dua for leaving the mosque" among its Hisn al-Muslim sections, with search inside the adhkar and offline reading. It also shows prayer times for your location, a countdown to the next prayer and adhan notifications, so you can head to the mosque on time. The app is free with ads, and an optional subscription removes them.
Summary
On the way to the mosque, say the dua of light. Enter with the right foot, seeking refuge in Allah from Satan, saying Bismillah, sending blessings on the Prophet and asking Allah to open the doors of His mercy. Leave with the left foot, asking Allah of His bounty and for protection from Satan the outcast.