Short answer
Pray with your eyes open. In the Hanafi school closing the eyes in salah is makruh tanzihi (mildly disliked), unless keeping them open distracts you so much that closing them helps you focus, in which case it is fine. While standing, keep your gaze on the place where you prostrate.
The sunnah is to keep the eyes open and lowered: on the place of sajdah when standing, the feet in ruku, the nose in sajdah, the lap when sitting and the shoulders at the salam. Closing the eyes is makruh tanzihi, and not disliked if done to keep out distraction. Looking up at the sky in prayer is forbidden.
Other madhhabs
- Shafi'i
- Closing the eyes is not disliked if it causes no harm, and some Shafi'i scholars prefer it when it helps concentration.
Explanation
The Prophet ﷺ prayed with his eyes open. Once a patterned cloak distracted him during prayer and he gave it away, which shows he was looking ahead of him. The Hanafi school holds that closing the eyes is mildly disliked because it goes against this practice.
Where to look, in the Hanafi texts:
- Standing: the place where your forehead will go in sajdah.
- Ruku: the tops of your feet.
- Sajdah: the tip of your nose.
- Sitting: your lap.
- Salam: your right shoulder, then your left.
- If open eyes distract you, for example in a busy room, closing them to focus is not disliked. Khushu (presence of heart) is the goal.
- Turning your head to look around is disliked; turning your chest away from the qibla breaks the prayer.
- Looking up at the sky during prayer is something the Prophet ﷺ warned against strongly.
Reducing distractions also helps: a plain spot, a phone on silent, nothing busy in front of you. See praying in front of a mirror and how to pray.
The evidence
Quran, Surah Al-Muminoon 23:1-2
بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ قَدْ أَفْلَحَ ٱلْمُؤْمِنُونَ ﴿١﴾ ٱلَّذِينَ هُمْ فِى صَلَاتِهِمْ خَٰشِعُونَ ﴿٢﴾
Certainly will the believers have succeeded: They who are during their prayer humbly submissive
Humility and focus in prayer are the goal.
Sahih al-Bukhari 750
Sahih... ما بال أقوام يرفعون أبصارهم إلى السماء في صلاتهم ...
"What is wrong with people who raise their eyes to the sky in their prayer?"
Looking up during prayer is forbidden.
Sahih al-Bukhari 373
Sahih... فإنها ألهتني آنفا عن صلاتي ...
"It distracted me just now from my prayer."
The Prophet ﷺ prayed with open eyes and removed what distracted him.
Where the ruling is recorded
- Nur al-Idah with Maraqi al-Falah, Chapter on the sunnah acts of prayer. Lists where the gaze rests in each position.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Salah, chapter on what is disliked in prayer. Closing the eyes is disliked unless it is done for focus.
- al-Majmu' (Nawawi), Chapter on the description of prayer. The Shafi'i view that closing the eyes is not disliked when there is no harm.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.