- Published on
How to Avoid Showing Off (Riya) in Islam
- Authors

- Name
- Ahmad
- Role
- Senior Marketing Manager, Islamic education • Deen Back
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
In the name of God, the Most Gracious, the Most Merciful.

You prayed. You gave to charity. You posted that Islamic quote. And somewhere in the middle of it, a quiet thought crossed your mind: What will people think?
That thought — that flicker of performing for someone other than Allah — is riya. And the Prophet ﷺ called it the hidden shirk.
The terrifying thing about riya is that it is invisible to almost everyone, including sometimes to yourself. You can appear devout and worship with corrupted intention. You can help others while being driven by your desire for their praise. The outer action and the inner poison can coexist.
This guide is about learning to see riya, catch it early, and build the habit of sincere worship.
Why Riya Is So Serious
The Prophet ﷺ did not warn us about riya lightly:
إِنَّ أَخْوَفَ مَا أَخَافُ عَلَيْكُمُ الشِّرْكُ الأَصْغَرُ قَالُوا وَمَا الشِّرْكُ الأَصْغَرُ يَا رَسُولَ اللَّهِ قَالَ الرِّيَاءُ
"The thing I fear most for you is the minor shirk." They asked: "What is the minor shirk, O Messenger of Allah?" He said: "Riya (showing off)." — (Musnad Ahmad 23630)
Why so serious? Because riya places human approval in the position that only Allah's approval should occupy. It makes you worship at the altar of people's opinions while using Islamic action as the vehicle. It is subtle, normalized, and dangerous precisely because it feels like piety.
Riya is addressed throughout the Quran. Allah condemns those who pray to be seen (Surah Al-Ma'un, 107:6) and praises those who give secretly (Surah Al-Baqarah, 2:274). The consistent teaching is that sincerity — ikhlas — is the heart of every accepted deed. Read more about this in what is riya in Islam.
Step-by-Step: How to Avoid Showing Off
Step 1: Practice Muhasabah — Check Your Intentions Beforehand
Before any significant act of worship or public goodness, pause and ask yourself honestly: Why am I doing this? Not the answer you want to give — the real one. If any part of the honest answer is about human approval, make istighfar and consciously redirect: Allahumma inni a'udhu bika an ushrika bika wa ana a'lam — "O Allah, I seek Your refuge from associating anything with You knowingly." (Musnad Ahmad 19606)
This is a one-minute practice. Building it as a pre-worship habit changes everything.
Step 2: Do More Good Deeds Secretly
The antidote to riya is practicing ikhlas muscles — and secret good deeds are the gym. Give charity in a way that no one knows. Pray extra prayers alone. Read Quran without mentioning it. Help someone anonymously. The more you practice pure sincerity without any possibility of human approval, the stronger your ikhlas becomes in public worship too.
Step 3: Audit Your Social Media Worship
This is where modern riya lives most visibly. Ask yourself: do I post Islamic content to benefit others, or do I post it to be seen as pious? Do I pray in public differently than I do at home? Do I read Quran where others can see me but not when I am alone? The answers to these questions are your riya profile. Start with the one that shows up most and address it specifically.
Step 4: Wean Off the Approval Dopamine
If you post an Islamic reminder and feel anxious until you see how many people liked it — that is riya in action. Start by not checking likes and comments for 24 hours after posting. Then extend it. The goal is to genuinely become indifferent to whether anyone validates your act of worship.
Step 5: Ground Yourself in the Akhirah Calculation
When the nafs pushes you toward riya, bring the akhirah calculation back to the foreground. The person you are performing for will not be in your grave. Their approval will not matter on the Day of Judgment. Allah — the only witness who matters — sees what is in your heart right now.
This is not a lecture. It is a practical thought tool: when you feel the pull to perform, consciously run through the reality that this deed is being recorded by the One whose opinion is the only one that actually counts.
Step 6: Make Dua for Ikhlas Specifically
Ikhlas is a gift from Allah, not purely a self-generated virtue. The Prophet ﷺ made dua for it:
اللَّهُمَّ إِنِّي أَعُوذُ بِكَ أَنْ أُشْرِكَ بِكَ وَأَنَا أَعْلَمُ وَأَسْتَغْفِرُكَ لِمَا لَا أَعْلَمُ
"O Allah, I seek refuge in You from associating others with You knowingly, and I seek Your forgiveness for what I am unaware of." — (Musnad Ahmad 19606)
Make this dua daily, especially before worship. It is the Prophet's own dua against riya — there is nothing more appropriate than following his example. See also showing off in worship for deeper exploration.
Build sincere worship habits daily
DeenBack helps you track your daily dhikr, dua, and worship — keeping your focus on consistency with Allah rather than performance for people.
Free download. Premium features available in-app.
Making the Habit of Ikhlas Stick
Pure sincerity is a practice, not an achievement. You do not attain ikhlas once and keep it forever — you maintain it through consistent intention renewal, regular self-examination, and the practice of secret good deeds.
Anchor your muhasabah to a specific daily moment: after Isha, spend two minutes reviewing the day. What did you do for Allah? What did you do for people's approval? No shame — just honesty, and a request for Allah to purify what was done. This five-minute review practice is one of the most powerful ikhlas builders.
Common Mistakes to Avoid
Thinking you are immune from riya. The scholars who worried most about riya were the most devout among the Salaf. If you think "I don't have this problem," it may be because you haven't looked closely enough. Riya is subtle precisely because it hides behind genuine worship.
Suppressing all public worship. The answer to riya is not to refuse to pray in public, give publicly, or share Islamic content. Public good has great reward. The answer is purifying the intention, not eliminating the act.
Confusing riya with legitimate pride. Feeling happy when others see you doing good and approve is human and not necessarily riya. The difference: are you doing the deed to seek their approval, or are you pleased by it secondarily? Intent is what matters.
Common Questions
What if I cannot tell if my deed is sincere? Make your best effort to clarify the intention, then act. Allah knows what you are not sure of. The dua above covers that: "and I seek Your forgiveness for what I am unaware of."
Is sharing knowledge online riya? Only if the primary motivation is to be seen as knowledgeable. If the primary motivation is benefit for others, it is da'wah. The test: would you share the same thing anonymously? If yes, likely not riya.
What about wearing Islamic dress — is that showing off? No. Wearing hijab or thobe is an act of obedience, not showing off. Showing off would be wearing it with the specific intention of appearing more pious than others. Intention makes the difference.
How long does it take to develop stronger ikhlas? It is a lifelong practice — even the Sahaba worked on this their whole lives. But you will notice a shift within weeks of the secret-good-deeds practice and regular muhasabah. Progress is real, even if it is gradual.
Start Today — Worship For the One Who Sees the Unseen
Allah sees your heart right now. He knows the mixture of sincerity and desire for approval in every good deed. He is not fooled by outer piety, and He does not punish honest struggling.
The path of ikhlas is not about achieving perfect sincerity immediately — it is about consistent, honest effort to orient every act toward Him. Do one secret good deed today. Check your intention before the next prayer. Ask Him to purify what you cannot purify yourself.
That is the practice. And it is beautiful.
Worship with sincerity, day by day
DeenBack tracks your daily worship and helps you stay consistent — not for streaks, but because Allah deserves your best intention every day.
Free download. Premium features available in-app.
Frequently Asked Questions
What is riya in Islam?
Riya is performing acts of worship or goodness with the intention — conscious or unconscious — of being seen and praised by others, rather than for Allah alone. It is called the 'hidden shirk' because it corrupts deeds while appearing religious.
Does riya cancel my good deeds?
Scholars say deeds done purely for riya with no genuine intention for Allah are not accepted. Deeds done sincerely for Allah but which include some desire to be seen require repentance and renewed intention. The key is catching it early.
What if riya enters my heart during a good deed?
If riya enters after you start a deed that was begun sincerely, many scholars say the deed is not nullified — you should acknowledge it, hate it, seek refuge in Allah, and continue with renewed sincerity. The exception is if the riya takes over completely.
Is it riya to share Islamic content online?
Not necessarily. If the intention is da'wah and benefit for others, it can be rewarded. If the motivation is primarily to appear pious or gain followers, it crosses into riya. Ask yourself honestly: would I post this if no one could see my name on it?
How do I check my intentions before worship?
Before any act of worship, pause and ask: why am I doing this? If the honest answer is 'so others will think well of me,' make istighfar and renew your intention. The practice of checking intentions (muhasabah) is itself an act of worship.
