❀ Ruling and Consequences of Masturbation While Fasting ❀
Written by: Qari Usama bin Abdus-Salaam (ḥafiẓahullāh)
As-Salāmu ʿAlaykum wa Raḥmatullāhi wa Barakātuh
Is it permissible to masturbate while fasting?
Wa ʿAlaykum as-Salām wa Raḥmatullāhi wa Barakātuh
No, masturbation is not permissible while fasting, and doing so invalidates the fast. The ruling on this issue can be understood in light of the Qur’an, Ahadith, and the opinions of Islamic jurists.
Allah ﷻ says:
وَٱلَّذِينَ هُمْ لِفُرُوجِهِمْ حَـٰفِظُونَ إِلَّا عَلَىٰٓ أَزْوَٰجِهِمْ أَوْ مَا مَلَكَتْ أَيْمَـٰنُهُمْ فَإِنَّهُمْ غَيْرُ مَلُومِينَ فَمَنِ ٱبْتَغَىٰ وَرَآءَ ذَٰلِكَ فَأُو۟لَـٰئِكَ هُمُ ٱلْعَادُونَ
(Surat al-Mu’minūn: 5–7)
Translation:
“And those who guard their private parts, except with their wives or those whom their right hands possess—for they are not blameworthy. But whoever seeks beyond that, then those are the transgressors.”
This verse clearly states that fulfilling desires outside of lawful means, such as through masturbation, is prohibited and a sinful act.
➊ The Prophet ﷺ said:
"الصِّيَامُ جُنَّةٌ، فَإِذَا كَانَ يَوْمُ صَوْمِ أَحَدِكُمْ فَلَا يَرْفُثْ وَلَا يَجْهَلْ"
(Saḥīḥ al-Bukhārī: 1904, Saḥīḥ Muslim: 1151)
Translation:
“Fasting is a shield. So when one of you is fasting, he should neither engage in obscenity nor act ignorantly.”
⚠ Masturbation is an indecent and immoral act, and the hadith instructs clear abstinence from such behavior during fasting.
➋ The Prophet ﷺ also said:
"يَدَعُ طَعَامَهُ وَشَرَابَهُ وَشَهْوَتَهُ مِنْ أَجْلِي"
(Saḥīḥ al-Bukhārī: 1894)
Translation:
“(The fasting person) leaves his food, drink, and desire for My sake.”
This indicates that controlling sexual desire is an essential part of fasting, and masturbation breaks this discipline, thereby invalidating the fast.
All major Islamic schools of thought—Ḥanafī, Shāfiʿī, Mālikī, and Ḥanbalī—agree on the following:
✔ If masturbation during fasting leads to ejaculation, the fast is nullified.
✔ In this case, Qaḍāʼ (making up the fast later) becomes obligatory.
✘ Kaffārah (expiation through 60 days of fasting or feeding 60 poor people) is not required, because masturbation, although sinful, is not equivalent to fornication.
⚠ Masturbation during fasting is ḥarām (forbidden) and a sin.
✔ If it results in ejaculation, the fast is broken, and Qaḍāʼ is obligatory.
No Kaffārah is required, but sincere repentance is necessary.
☘ One should repent sincerely and avoid this act, especially in the sacred month of Ramadan.
اللّٰهم أعنا على طاعتك، وفهمنا حرمة رمضان، وارزقنا قوة على مجاهدة النفس، آمين!
O Allah, help us in Your obedience, grant us understanding of Ramadan’s sanctity, and bestow upon us the strength to fight our desires. Āmīn!

❖ Question:
As-Salāmu ʿAlaykum wa Raḥmatullāhi wa Barakātuh
Is it permissible to masturbate while fasting?
❖ Answer:
Wa ʿAlaykum as-Salām wa Raḥmatullāhi wa Barakātuh
No, masturbation is not permissible while fasting, and doing so invalidates the fast. The ruling on this issue can be understood in light of the Qur’an, Ahadith, and the opinions of Islamic jurists.
❖ In the Light of the Qur’an
Allah ﷻ says:
وَٱلَّذِينَ هُمْ لِفُرُوجِهِمْ حَـٰفِظُونَ إِلَّا عَلَىٰٓ أَزْوَٰجِهِمْ أَوْ مَا مَلَكَتْ أَيْمَـٰنُهُمْ فَإِنَّهُمْ غَيْرُ مَلُومِينَ فَمَنِ ٱبْتَغَىٰ وَرَآءَ ذَٰلِكَ فَأُو۟لَـٰئِكَ هُمُ ٱلْعَادُونَ
(Surat al-Mu’minūn: 5–7)
Translation:
“And those who guard their private parts, except with their wives or those whom their right hands possess—for they are not blameworthy. But whoever seeks beyond that, then those are the transgressors.”

❖ In the Light of Hadith
➊ The Prophet ﷺ said:
"الصِّيَامُ جُنَّةٌ، فَإِذَا كَانَ يَوْمُ صَوْمِ أَحَدِكُمْ فَلَا يَرْفُثْ وَلَا يَجْهَلْ"
(Saḥīḥ al-Bukhārī: 1904, Saḥīḥ Muslim: 1151)
Translation:
“Fasting is a shield. So when one of you is fasting, he should neither engage in obscenity nor act ignorantly.”
⚠ Masturbation is an indecent and immoral act, and the hadith instructs clear abstinence from such behavior during fasting.
➋ The Prophet ﷺ also said:
"يَدَعُ طَعَامَهُ وَشَرَابَهُ وَشَهْوَتَهُ مِنْ أَجْلِي"
(Saḥīḥ al-Bukhārī: 1894)
Translation:
“(The fasting person) leaves his food, drink, and desire for My sake.”

❖ Opinions of the Jurists (Fuqahāʼ)
All major Islamic schools of thought—Ḥanafī, Shāfiʿī, Mālikī, and Ḥanbalī—agree on the following:
✔ If masturbation during fasting leads to ejaculation, the fast is nullified.
✔ In this case, Qaḍāʼ (making up the fast later) becomes obligatory.
✘ Kaffārah (expiation through 60 days of fasting or feeding 60 poor people) is not required, because masturbation, although sinful, is not equivalent to fornication.
❖ Conclusion
⚠ Masturbation during fasting is ḥarām (forbidden) and a sin.
✔ If it results in ejaculation, the fast is broken, and Qaḍāʼ is obligatory.

☘ One should repent sincerely and avoid this act, especially in the sacred month of Ramadan.
❖ Supplication
اللّٰهم أعنا على طاعتك، وفهمنا حرمة رمضان، وارزقنا قوة على مجاهدة النفس، آمين!
O Allah, help us in Your obedience, grant us understanding of Ramadan’s sanctity, and bestow upon us the strength to fight our desires. Āmīn!