Guide
What is riya (showing off) in salah, and what do you do about it?
Riya is doing an act of worship so that people will see it and think well of you. The Qur'an commands worship that is "sincere to Him" (al-Bayyinah 98:5). When you notice riya in the middle of salah, the advice summarised from Imam al-Ghazali's Ihya is to keep praying and turn your intention back to Allah.
Maybe someone walked into the room and your ruku got a little longer. Maybe you noticed that you pray differently at the mosque than you do alone. Noticing it is uncomfortable, and it can make you distrust every prayer you have ever prayed.
The tradition talks about showing off in prayer openly, whether you call the prayer salah, salat or namaz. It is one of the most discussed troubles of people who worship, and nothing on this page is a verdict on you or your prayer.
What the Qur'an and hadith say
The Qur'an states the aim plainly:
"They were commanded only to worship Allah, sincere to Him in religion."Qur'an, al-Bayyinah 98:5 (meaning in English)

It also criticises prayer that is done for show (al-Ma'un 107:4-6).
The Prophet, peace be upon him, said that deeds are by their intentions, and that each person will have what they intended (Sahih al-Bukhari 1).
And there is a report that names riya in prayer directly. Abu Sa'id al-Khudri said the Prophet, peace be upon him, came out while the companions were talking about the Dajjal. He told them there was something he feared for them more: a hidden kind of shirk, where a person stands to pray and makes the prayer look better because they see someone watching (Sunan Ibn Majah 4204, graded hasan by Darussalam).
Look at who he was speaking to. They were his own companions. The warning is given to people who pray, about a risk that comes with praying where others can see. We read it as something to watch for. It is not a label for us to put on anyone.
What the scholars said to do
Imam al-Ghazali gives a whole book of the Ihya to this, Book 28, where he pairs showing off with the love of status. As it is summarised in the works we draw on, his central advice is this: when you notice riya in a deed, you do not stop the deed. You continue it and correct the intention.
He passes on a saying reported from al-Fudayl ibn 'Iyad. In summary: giving up a good deed because of people is itself a kind of showing off, doing it for people is worse, and sincerity is to be freed from both.
So there are two ways to go wrong, and the second is easy to miss. One is performing for the room. The other is leaving the mosque, hiding your prayer, or dropping a good habit because you no longer trust your motives. Both put people at the centre. The scholars' answer to both is to turn back to Allah and carry on.
This sits close to the wider work of presence in prayer, which we cover here: How do I focus in salah?
One thing to try when you notice it
This is our own exercise, drawn from those works. It is not a ruling and it adds nothing to the prayer itself.
One correction, then forward.
- When you notice you are aware of being watched, do not stop the prayer and do not start it again.
- Turn back once, in your heart: this is for Allah. No words are needed, and nothing is added.
- Finish the prayer exactly as you would have prayed it alone. Do not lengthen it to look devout. Do not shorten it to prove a point.
- Afterwards, do not investigate. One correction, and no second look.
- Later that day, do one voluntary good thing that nobody will ever trace to you. Tell no one.

The last step has a source. Among the seven whom Allah will shade is the person who gives charity so quietly that their left hand does not know what their right hand gave (Sahih al-Bukhari 660). A hidden deed reminds you who worship is for.
We cannot promise this will make the pull go away. The teachers describe riya as something that thins over time, and they do not describe a day when you become certain of your own sincerity.
A warning, and please read it. Some people read about riya and start checking, restarting and repeating their prayers. If that is you, this exercise is not for you, and reading more about riya will not help. You need a living teacher. And if the doubts will not stop, or they are taking over your day, please also speak to a doctor or a mental health professional. We have written about that here: Waswas and unwanted thoughts in salah.
Questions people ask next
Does showing off in prayer make my salah invalid?
We do not rule on validity or reward. What we can say is that the advice in the works we draw on is to continue the prayer and correct the intention, and not to walk away from it. For your own case, ask a qualified teacher.
Should I stop praying in front of people so I do not show off?
The saying reported from al-Fudayl treats that as the same problem in another form. Congregational prayer is also something meant to be seen. If you are unsure what to keep public and what to keep private, ask a teacher who knows you.
I like being thought of as religious. What does that say about me?
We are not in a position to judge your heart. Noticing the pull is where the teachers say the work starts. We wrote about that feeling here: I like being thought of as religious, and I have started to notice it.
How do I know my intention was sincere?
You will not get certainty, and the teachers warn against chasing it. Correct the intention going in, and leave the rest with Allah. See also: Is my prayer accepted if I was distracted or felt nothing?
Read next
- How does salah change your life, and why has it not changed mine?
- How do I focus in salah?
- Is my prayer accepted if I was distracted or felt nothing?
- What is the nafs, and how do you control it?
We are not scholars. We are practising Muslims curating what the scholars of this ummah already wrote, held to the standard of the Qur'an and Sunnah. Verify everything. Ask your local people of knowledge.
This article draws on the "Diseases of the Heart" section of 120 Classical Practices, one of the eight books in Feel Your Prayer Again.