Questions Marriage and family

Is it haram to have sexual thoughts in Islam?

Checked by our team

Short answer

Thoughts that come by themselves are not a sin, and you are not held to account for them. What is sinful is deliberately dwelling on a non-mahram, feeding fantasies with images, or acting on them. Thinking about your own spouse is fine. The four schools agree.

Hanafi position

Passing thoughts and inner talk that you do not act on are forgiven. Deliberately enjoying fantasies about a non-mahram is blameworthy because it is a step towards zina, and looking with desire is haram. A firm resolve to commit a sin is recorded against a person.

The four schools agree on this.

Explanation

Sexual feelings are part of being human, and they often arrive without being asked. The Prophet ﷺ said that Allah has forgiven his ummah what their selves say to them, as long as they do not act on it or speak it. Allah does not charge a soul beyond its capacity (2:286).

Scholars describe the stages of a thought:

  • A thought that flashes and leaves: no sin.
  • A thought that lingers while you push it away: no sin, and resisting it is rewarded.
  • Inner talk you notice but do not act on: forgiven, though you should turn away from it.
  • An inclination to a sin that you then leave: not written against you, and written as a good deed if you left it for Allah.
  • A firm resolve to do the sin: this is recorded against you.

Deliberately calling up fantasies about a specific person you cannot marry, staring, scrolling images or watching pornography crosses the line. The Prophet ﷺ said the eyes commit zina by looking, the self wishes and desires, and the private parts confirm it or deny it. So the problem is not the first thought but the chain you choose to follow.

What helps. Lower your gaze (24:30), cut off triggers, keep busy, fast, and marry when you can. See is marriage obligatory and masturbation. Thinking about your own husband or wife is permitted. If unwanted thoughts keep coming and cause you anxiety, ignore them: worrying over them is waswasa (whispering), not sin.

The evidence

Quran, Surah Al-Baqara 2:286

لَا يُكَلِّفُ ٱللَّهُ نَفْسًا إِلَّا وُسْعَهَا ۚ لَهَا مَا كَسَبَتْ وَعَلَيْهَا مَا ٱكْتَسَبَتْ ۗ رَبَّنَا لَا تُؤَاخِذْنَآ إِن نَّسِينَآ أَوْ أَخْطَأْنَا ۚ رَبَّنَا وَلَا تَحْمِلْ عَلَيْنَآ إِصْرًۭا كَمَا حَمَلْتَهُۥ عَلَى ٱلَّذِينَ مِن قَبْلِنَا ۚ رَبَّنَا وَلَا تُحَمِّلْنَا مَا لَا طَاقَةَ لَنَا بِهِۦ ۖ وَٱعْفُ عَنَّا وَٱغْفِرْ لَنَا وَٱرْحَمْنَآ ۚ أَنتَ مَوْلَىٰنَا فَٱنصُرْنَا عَلَى ٱلْقَوْمِ ٱلْكَٰفِرِينَ ﴿٢٨٦﴾

Allah does not charge a soul except [with that within] its capacity. It will have [the consequence of] what [good] it has gained, and it will bear [the consequence of] what [evil] it has earned. "Our Lord, do not impose blame upon us if we have forgotten or erred. Our Lord, and lay not upon us a burden like that which You laid upon those before us. Our Lord, and burden us not with that which we have no ability to bear. And pardon us; and forgive us; and have mercy upon us. You are our protector, so give us victory over the disbelieving people."

People are not blamed for what they cannot control.

Quran 2:286, translation by Sahih International

Quran, Surah An-Noor 24:30

قُل لِّلْمُؤْمِنِينَ يَغُضُّوا۟ مِنْ أَبْصَٰرِهِمْ وَيَحْفَظُوا۟ فُرُوجَهُمْ ۚ ذَٰلِكَ أَزْكَىٰ لَهُمْ ۗ إِنَّ ٱللَّهَ خَبِيرٌۢ بِمَا يَصْنَعُونَ ﴿٣٠﴾

Tell the believing men to reduce [some] of their vision and guard their private parts. That is purer for them. Indeed, Allah is Acquainted with what they do.

The practical command that keeps thoughts from becoming sins.

Quran 24:30, translation by Sahih International

Sahih al-Bukhari 5269

Sahih

... إن الله تجاوز عن أمتي ما حدثت به أنفسها ما لم تعمل أو تتكلم ...

"Allah has forgiven my ummah what their selves say to them, as long as they do not act on it or speak it."

Thoughts alone are not sins.

Sahih al-Bukhari 5269 · Sahih · Read on sunnah.com

Sahih al-Bukhari 6243

Sahih

... والنفس تمنى وتشتهي والفرج يصدق ذلك كله ويكذبه ...

"The self wishes and desires, and the private parts confirm all that or deny it."

Desire that is fed and acted on leads to zina.

Sahih al-Bukhari 6243 · Sahih · Read on sunnah.com

Where the ruling is recorded

  • Radd al-Muhtar (Ibn Abidin), Kitab al-Hazr wa al-Ibahah, Fasl fi al-Nazar wa al-Mass. Looking at a non-mahram with desire is haram.
  • al-Ashbah wa al-Naza'ir (Ibn Nujaym), The first principle, on intentions. The stages of a thought, from a passing notion to firm resolve, and which are taken to account.

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.