Islam and sexual ethics: what's allowed? Masturbation, sex in Ramadan, contraception
In Islam, sex is allowed and good within marriage, and forbidden outside it. Most scholars say masturbation isn't allowed, though some allow it to avoid a greater sin. Married couples may use contraception by mutual agreement, but may not have sex during menstruation or during the daytime while fasting. Using donated eggs or sperm, or surrogacy, is not allowed according to most scholars.
How to read this page
These are short, general answers to questions people search for. Each one starts with a label:
- Allowed: fine in normal circumstances.
- Allowed with conditions: fine if certain things are kept in mind.
- Scholars differ: respected scholars hold different views; both are followed by sincere Muslims.
- Most scholars say no: the majority view is that it’s not allowed, with some exceptions or a minority view.
- Not allowed: scholars agree it’s forbidden.
Islam’s starting rule is that things are allowed unless there’s clear evidence they’re forbidden. For your own situation, especially anything involving health, money or family, ask a scholar you trust.
Is it haram to have sex?
Within marriage, allowed and rewarded. The Prophet ﷺ said there’s reward in it, like charity. Outside marriage, not allowed.
Is it haram to masturbate?
Most scholars say no (the Shafi’i and Maliki schools, and many others), based on the Quran’s praise of those who “guard their private parts except with their spouses.” Some Hanafi and Hanbali scholars allowed it as a lesser harm for someone truly at risk of falling into sex outside marriage. All encourage fasting, avoiding triggers, and marrying when possible, and remind people that God’s forgiveness is always open. This includes “gooning” and similar habits, which scholars also warn are harmful because of their link with pornography.
Is it haram to watch porn or explicit scenes?
Not allowed. It’s included in the command to lower the gaze. Watching people kiss in ordinary movies is discouraged; scholars differ on how strict to be.
Is it haram to have sex during Ramadan?
Allowed at night between spouses. Not allowed during the daytime while fasting; doing it deliberately breaks the fast and requires a serious expiation.
Is it haram to have sex during a period?
Not allowed. The Quran says to keep away during menstruation. Other affection is fine.
What is allowed between a husband and wife?
Most things, by mutual consent and kindness: the Quran describes spouses as “garments for each other.” Scholars agree on two prohibitions: intercourse during menstruation and anal intercourse. Some other intimate acts are discussed by scholars; many allow them, while some consider certain acts disliked. Couples with specific questions are encouraged to ask a scholar privately.
Is it haram to use a condom or other contraception?
Allowed for married couples by mutual agreement, according to most scholars, as long as it isn’t harmful or permanent without good reason.
Is it haram to get your tubes tied or a vasectomy?
Most scholars say no to permanent sterilization, unless there’s a serious medical reason, such as pregnancy endangering the mother’s life.
Is it haram to freeze your eggs or use IVF?
IVF using the married couple’s own egg and sperm is allowed by most scholars. Freezing eggs for later use within marriage is allowed by many. Using them after divorce or the husband’s death is not allowed.
Is it haram to donate sperm or eggs, or be a surrogate?
Not allowed according to most scholars, because a child would be born from people who aren’t married to each other, which confuses lineage, an important value in Islamic law.
Sources
وَٱلَّذِينَ هُمْ لِفُرُوجِهِمْ حَـٰفِظُونَ ﴿٥﴾ إِلَّا عَلَىٰٓ أَزْوَٰجِهِمْ أَوْ مَا مَلَكَتْ أَيْمَـٰنُهُمْ فَإِنَّهُمْ غَيْرُ مَلُومِينَ ﴿٦﴾ فَمَنِ ٱبْتَغَىٰ وَرَآءَ ذَٰلِكَ فَأُو۟لَـٰٓئِكَ هُمُ ٱلْعَادُونَ ﴿٧﴾
“(5) And they who guard their private parts (6) Except from their wives or those their right hands possess, for indeed, they will not be blamed - (7) But whoever seeks beyond that, then those are the transgressors -”
Translation: Saheeh International
أُحِلَّ لَكُمْ لَيْلَةَ ٱلصِّيَامِ ٱلرَّفَثُ إِلَىٰ نِسَآئِكُمْ ۚ هُنَّ لِبَاسٌ لَّكُمْ وَأَنتُمْ لِبَاسٌ لَّهُنَّ ۗ عَلِمَ ٱللَّهُ أَنَّكُمْ كُنتُمْ تَخْتَانُونَ أَنفُسَكُمْ فَتَابَ عَلَيْكُمْ وَعَفَا عَنكُمْ ۖ فَٱلْـَٔـٰنَ بَـٰشِرُوهُنَّ وَٱبْتَغُوا۟ مَا كَتَبَ ٱللَّهُ لَكُمْ ۚ وَكُلُوا۟ وَٱشْرَبُوا۟ حَتَّىٰ يَتَبَيَّنَ لَكُمُ ٱلْخَيْطُ ٱلْأَبْيَضُ مِنَ ٱلْخَيْطِ ٱلْأَسْوَدِ مِنَ ٱلْفَجْرِ ۖ ثُمَّ أَتِمُّوا۟ ٱلصِّيَامَ إِلَى ٱلَّيْلِ ۚ وَلَا تُبَـٰشِرُوهُنَّ وَأَنتُمْ عَـٰكِفُونَ فِى ٱلْمَسَـٰجِدِ ۗ تِلْكَ حُدُودُ ٱللَّهِ فَلَا تَقْرَبُوهَا ۗ كَذَٰلِكَ يُبَيِّنُ ٱللَّهُ ءَايَـٰتِهِۦ لِلنَّاسِ لَعَلَّهُمْ يَتَّقُونَ
“It has been made permissible for you the night preceding fasting to go to your wives [for sexual relations]. They are a clothing for you and you are a clothing for them. Allāh knows that you used to deceive yourselves, so He accepted your repentance and forgave you. So now, have relations with them and seek that which Allāh has decreed for you [i.e., offspring]. And eat and drink until the white thread of dawn becomes distinct to you from the black thread [of night]. Then complete the fast until the night [i.e., sunset]. And do not have relations with them as long as you are staying for worship in the mosques. These are the limits [set by] Allāh, so do not approach them. Thus does Allāh make clear His verses [i.e., ordinances] to the people that they may become righteous.”
Translation: Saheeh International
وَيَسْـَٔلُونَكَ عَنِ ٱلْمَحِيضِ ۖ قُلْ هُوَ أَذًى فَٱعْتَزِلُوا۟ ٱلنِّسَآءَ فِى ٱلْمَحِيضِ ۖ وَلَا تَقْرَبُوهُنَّ حَتَّىٰ يَطْهُرْنَ ۖ فَإِذَا تَطَهَّرْنَ فَأْتُوهُنَّ مِنْ حَيْثُ أَمَرَكُمُ ٱللَّهُ ۚ إِنَّ ٱللَّهَ يُحِبُّ ٱلتَّوَّٰبِينَ وَيُحِبُّ ٱلْمُتَطَهِّرِينَ
“And they ask you about menstruation. Say, "It is harm, so keep away from wives during menstruation. And do not approach them until they are pure. And when they have purified themselves, then come to them from where Allāh has ordained for you. Indeed, Allāh loves those who are constantly repentant and loves those who purify themselves."”
Translation: Saheeh International
Not yet reviewed by a scholar. Spot a mistake? Tell us
Related questions
- What does Islam say about sex?
- Is it haram to have a girlfriend, a crush, or be friends with the opposite gender?
- What does Islam say about abortion?
- Is it haram to adopt, not get married, or change your last name? Family and marriage
- Is it haram to believe in aliens, ghosts or evolution? Beliefs and identity