Is it haram to fantasize or daydream about someone?

Question 1130

Question

Is it a sin in Islam to daydream or have fantasies about a person you are attracted to?

Summary of answer

Daydreams and fantasies are part of being human, and Allah does not hold a person to account for them. The Prophet ﷺ said that Allah pardons what passes through the soul so long as a person does not act on it or speak it (Bukhari 5269), and the Quran tells those hoping to marry, 'Allah knows that you will think of them' (2:235). What matters is what a person does with the feeling, and whether it harms anyone.

Answer

الحمد لله Praise be to Allah.

Sunlight through stained-glass windows throws pools of red, blue, green, and violet across the carpets between the carved columns of a dim prayer hall.

Almost everyone daydreams about someone at some point: a face that returns to your mind, a conversation you replay, a future you imagine together. Sometimes the imagination turns to desire. Many Muslims feel guilty for thoughts they never chose and ask whether fantasizing is haram. The answer of the Sunnah is merciful and clear. Allah does not hold a person to account for what passes through the mind and heart. What He asks of us concerns what we do and what we say.

Is it haram to fantasize about someone in Islam?

The Prophet ﷺ said:

«إِنَّ اللَّهَ تَجَاوَزَ عَنْ أُمَّتِي مَا حَدَّثَتْ بِهِ أَنْفُسَهَا، مَا لَمْ تَعْمَلْ أَوْ تَتَكَلَّمْ»

“Allah has pardoned my community for whatever their souls tell them, so long as they do not act on it or speak it.”

Sahih al-Bukhari 5269

The Companions once feared the opposite. When the verse “whether you reveal what is in yourselves or conceal it, Allah will call you to account for it” (2:284) was revealed, they came to the Prophet ﷺ on their knees, saying this was beyond their strength. He taught them to answer, “We hear and we obey.” Allah then revealed the closing verses of Sūrat al-Baqara, “Allah does not burden any soul beyond what it can bear” (Quran 2:286), and answered each of their prayers, “I have done so” (Sahih Muslim 126).

What does the Quran say about thinking of someone you hope to marry?

The Quran speaks tenderly of exactly this. Addressing men who hoped to marry a widow still in her waiting period, it says:

وَلَا جُنَاحَ عَلَيۡكُمۡ فِيمَا عَرَّضۡتُم بِهِۦ مِنۡ خِطۡبَةِ ٱلنِّسَآءِ أَوۡ أَكۡنَنتُمۡ فِيٓ أَنفُسِكُمۡۚ عَلِمَ ٱللَّهُ أَنَّكُمۡ سَتَذۡكُرُونَهُنَّ

“There is no blame on you for hinting at a proposal of marriage, or for what you keep hidden in yourselves. Allah knows that you will think of them.”

Quran 2:235

Allah names the hidden longing of the heart, and He calls it blameless. Even the prophet Joseph (peace be upon him) is described as feeling the pull toward the woman who pursued him, had he not seen the sign of his Lord (12:24). Many commentators read this as the passing inclination of human nature, which he never acted upon.

What did the scholars say about thoughts and desires?

Imam al-Ghazālī (d. 1111), in the book on the marvels of the heart in his Iḥyāʾ ʿUlūm al-Dīn, distinguished the stages of what moves within us. A passing thought (khāṭir) and the pull of nature (mayl al-ṭabʿ) arise without our choosing, and no one is asked to prevent them. Accountability begins only with a firm resolve (ʿazm) to commit a wrong. Even then, the door of mercy stays open, as the Prophet ﷺ reported from his Lord:

«وَمَنْ هَمَّ بِسَيِّئَةٍ فَلَمْ يَعْمَلْهَا كَتَبَهَا اللَّهُ لَهُ عِنْدَهُ حَسَنَةً كَامِلَةً، فَإِنْ هُوَ هَمَّ بِهَا فَعَمِلَهَا كَتَبَهَا اللَّهُ لَهُ سَيِّئَةً وَاحِدَةً»

“Whoever intends a bad deed and does not do it, Allah writes it down with Him as a complete good deed. If he intends it and does it, Allah writes it down as a single bad deed.”

Sahih al-Bukhari 6491

The Prophet ﷺ also described how desire moves through a person: “the soul wishes and desires, and the private parts confirm it or deny it” (Sahih al-Bukhari 6243). Ibn ʿAbbās (may Allah be pleased with him) said he knew of nothing closer to what the Quran calls al-lamam, the small faults that Allah’s vast forgiveness covers (53:32). The wish of the soul stands at the beginning of that chain, in the region of pardon.

Some scholars urged caution about deliberately dwelling on a particular person who is out of reach, such as someone else’s spouse, and some later jurists disliked a person imagining someone else during intimacy with their own spouse. These counsels guard real relationships and are worth taking to heart. They do not turn the mind’s wanderings into a sin.

When does fantasizing become a problem?

  • When it moves into action that wrongs someone. Pursuing a married person, deceiving someone, or pressuring anyone toward intimacy turns a private thought into harm.
  • When it treats a real person as an object. Every human being carries the dignity Allah gave the children of Adam (17:70). Imagination that breeds entitlement or contempt toward real people deserves correction.
  • When it crowds out your life. If daydreaming consumes hours, disturbs your prayer, study, or sleep, or keeps you from real relationships, speak with a counselor. Persistent daydreaming can be eased with help.
  • When it hurts your marriage. Spouses owe each other loyalty and attention. Within marriage, desire and imagination shared with your spouse are a gift (2:187).

Thoughts about someone of the same sex follow the same guidance (Is being gay haram?). Related questions are answered in Is having a crush haram?, Is masturbation haram?, and Is dating haram in Islam?.

What should I do with my daydreams?

Let passing thoughts pass, without guilt. Turn the longing into duʿāʾ, asking Allah for a good companion and a good life. If you hope to marry someone, move toward it honorably. If you have acted on a fantasy in a way you regret, Allah’s forgiveness is wider than any mistake (Does Allah forgive all sins?).

A closing word

The Quran tells us that the One who knows our every whisper is also the One closest to us:

وَلَقَدۡ خَلَقۡنَا ٱلۡإِنسَٰنَ وَنَعۡلَمُ مَا تُوَسۡوِسُ بِهِۦ نَفۡسُهُۥۖ وَنَحۡنُ أَقۡرَبُ إِلَيۡهِ مِنۡ حَبۡلِ ٱلۡوَرِيدِ

“We created the human being, and We know what his soul whispers to him, and We are nearer to him than his jugular vein.”

Quran 50:16

He sees the whole heart, its longings included, with mercy. May He fill your heart with what is good and lead your hopes to what pleases Him.

And Allah knows best. والله أعلم

Frequently asked questions

Is it haram to fantasize about your future husband or wife?

No. The Quran itself acknowledges that people hoping to marry think of each other (2:235). Let the hope move you toward a good marriage and toward duʿāʾ.

Is it haram to fantasize during Ramadan?

Thoughts that pass through the mind do not break the fast. The jurists held that the fast is broken by deliberate acts, and a fasting person who finds their mind wandering can turn it gently to dhikr.

Is it haram to fantasize about your own spouse?

No. Desire and imagination within marriage are a gift, and the Quran calls spouses garments for one another (2:187).

What if I fantasize about someone who is married?

The passing thought carries no blame, but do not feed it or act on it. Keep a respectful distance, protect their marriage, and let the feeling fade.

Related questions

Sources

  1. Sahih al-Bukhari 5269, 6491, 6243
  2. Sahih Muslim 125, 126
  3. al-Ghazālī, Iḥyāʾ ʿUlūm al-Dīn, Kitāb Sharḥ ʿAjāʾib al-Qalb (The Marvels of the Heart)

Image: Ayyoubsabawiki, Morning light in the Nasir al-Mulk Mosque, Shiraz, 2015. CC BY-SA 4.0, via Wikimedia Commons.. Image credits