Why do Muslims fast in Ramadan?

The short answer

Muslims fast because Allah prescribed it "that you may become righteous" (gain taqwa). Fasting trains self-control, shields from sin and the Fire, and carries a reward Allah keeps for Himself. Whoever fasts Ramadan with faith and hope of reward has his past sins forgiven.

Explanation

The Quran gives the purpose in the very verse that commands it: "decreed upon you is fasting as it was decreed upon those before you that you may become righteous" 1. Taqwa (mindfulness of Allah) is the goal. If you can leave even halal food and drink for Allah from dawn to sunset, you are training yourself to leave the haram all year.

Allah chose Ramadan because it is the month "in which was revealed the Qur'an, a guidance for the people" 2, and He wants us to "glorify Allah for that [to] which He has guided you" and be grateful 2.

Fasting has a special place among deeds. In a hadith qudsi, Allah says: "All the deeds of Adam's sons are for them, except fasting which is for Me, and I will give the reward for it." The Prophet ﷺ added that fasting is a shield from the Fire and from sin, that the fasting person has two joys, one when breaking the fast and one when meeting his Lord, and that even the smell of a fasting mouth is better to Allah than musk 3.

The rewards are huge. "Whoever observes fasts during the month of Ramadan out of sincere faith, and hoping to attain Allah's rewards, then all his past sins will be forgiven" 4. Paradise has a gate called ar-Rayyan that only those who fasted will enter 5. And in Ramadan the gates of heaven are opened, the gates of Hell are closed and the devils are chained 6.

But the heart of fasting is not hunger. "Whoever does not give up forged speech and evil actions, Allah is not in need of his leaving his food and drink" 7. A fast that changes the tongue and the heart is the fast that fulfils its purpose.

The evidence

  1. 1
    Quran Al-Baqara · 2:183

    Fasting is prescribed so that you may become righteous, as it was for those before you.

    يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُواْ كُتِبَ عَلَيۡكُمُ ٱلصِّيَامُ كَمَا كُتِبَ عَلَى ٱلَّذِينَ مِن قَبۡلِكُمۡ لَعَلَّكُمۡ تَتَّقُونَ ۝١٨٣

    O you who have believed, decreed upon you is fasting as it was decreed upon those before you that you may become righteous

  2. 2
    Quran Al-Baqara · 2:185

    Ramadan is the month the Quran was revealed; glorify Allah for His guidance and be grateful.

    شَهۡرُ رَمَضَانَ ٱلَّذِيٓ أُنزِلَ فِيهِ ٱلۡقُرۡءَانُ هُدࣰ ى لِّلنَّاسِ وَبَيِّنَٰتࣲ مِّنَ ٱلۡهُدَىٰ وَٱلۡفُرۡقَانِۚ فَمَن شَهِدَ مِنكُمُ ٱلشَّهۡرَ فَلۡيَصُمۡهُۖ وَمَن كَانَ مَرِيضًا أَوۡ عَلَىٰ سَفَرࣲ فَعِدَّةࣱ مِّنۡ أَيَّامٍ أُخَرَۗ يُرِيدُ ٱللَّهُ بِكُمُ ٱلۡيُسۡرَ وَلَا يُرِيدُ بِكُمُ ٱلۡعُسۡرَ وَلِتُكۡمِلُواْ ٱلۡعِدَّةَ وَلِتُكَبِّرُواْ ٱللَّهَ عَلَىٰ مَا هَدَىٰكُمۡ وَلَعَلَّكُمۡ تَشۡكُرُونَ ۝١٨٥

    The month of Ramadhan [is that] in which was revealed the Qur'an, a guidance for the people and clear proofs of guidance and criterion. So whoever sights [the new moon of] the month, let him fast it; and whoever is ill or on a journey - then an equal number of other days. Allah intends for you ease and does not intend for you hardship and [wants] for you to complete the period and to glorify Allah for that [to] which He has guided you; and perhaps you will be grateful

  3. 3
    Hadith Sahih al-Bukhari 1904
    Sahih Bukhari

    Fasting is for Allah and He rewards it; it is a shield, and the fasting person has two joys.

    Narrated Abu Huraira:Allah's Messenger (ﷺ) said, "Allah said, 'All the deeds of Adam's sons (people) are for them, except fasting which is for Me, and I will give the reward for it.' Fasting is a shield or protection from the fire and from committing sins. If one of you is fasting, he should avoid sexual relation with his wife and quarreling, and if somebody should fight or quarrel with him, he should say, 'I am fasting.' By Him in Whose Hands my soul is' The unpleasant smell coming out from the mouth of a fasting person is better in the sight of Allah than the smell of musk. There are two pleasures for the fasting person, one at the time of breaking his fast, and the other at the time when he will meet his Lord; then he will be pleased because of his fasting

    العربية

    حَدَّثَنَا إِبْرَاهِيمُ بْنُ مُوسَى، أَخْبَرَنَا هِشَامُ بْنُ يُوسُفَ، عَنِ ابْنِ جُرَيْجٍ، قَالَ أَخْبَرَنِي عَطَاءٌ، عَنْ أَبِي صَالِحٍ الزَّيَّاتِ، أَنَّهُ سَمِعَ أَبَا هُرَيْرَةَ ـ رضى الله عنه ـ يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ قَالَ اللَّهُ كُلُّ عَمَلِ ابْنِ آدَمَ لَهُ إِلاَّ الصِّيَامَ، فَإِنَّهُ لِي، وَأَنَا أَجْزِي بِهِ‏.‏ وَالصِّيَامُ جُنَّةٌ، وَإِذَا كَانَ يَوْمُ صَوْمِ أَحَدِكُمْ، فَلاَ يَرْفُثْ وَلاَ يَصْخَبْ، فَإِنْ سَابَّهُ أَحَدٌ، أَوْ قَاتَلَهُ فَلْيَقُلْ إِنِّي امْرُؤٌ صَائِمٌ‏.‏ وَالَّذِي نَفْسُ مُحَمَّدٍ بِيَدِهِ لَخُلُوفُ فَمِ الصَّائِمِ أَطْيَبُ عِنْدَ اللَّهِ مِنْ رِيحِ الْمِسْكِ، لِلصَّائِمِ فَرْحَتَانِ يَفْرَحُهُمَا إِذَا أَفْطَرَ فَرِحَ، وَإِذَا لَقِيَ رَبَّهُ فَرِحَ بِصَوْمِهِ ‏"‏‏.‏

  4. 4
    Hadith Sahih al-Bukhari 38
    Sahih Bukhari

    Fasting Ramadan with faith and hope of reward forgives past sins.

    Narrated Abu Huraira: Allah's Messenger (ﷺ) said, "Whoever observes fasts during the month of Ramadan out of sincere faith, and hoping to attain Allah's rewards, then all his past sins will be forgiven

    العربية

    حَدَّثَنَا ابْنُ سَلاَمٍ، قَالَ أَخْبَرَنَا مُحَمَّدُ بْنُ فُضَيْلٍ، قَالَ حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ صَامَ رَمَضَانَ إِيمَانًا وَاحْتِسَابًا غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ ‏"‏‏.‏

  5. 5
    Hadith Sahih al-Bukhari 1896
    Sahih Bukhari

    The gate of ar-Rayyan in Paradise is only for those who fasted.

    Narrated Sahl:The Prophet (ﷺ) said, "There is a gate in Paradise called Ar-Raiyan, and those who observe fasts will enter through it on the Day of Resurrection and none except them will enter through it. It will be said, 'Where are those who used to observe fasts?' They will get up, and none except them will enter through it. After their entry the gate will be closed and nobody will enter through it

    العربية

    حَدَّثَنَا خَالِدُ بْنُ مَخْلَدٍ، حَدَّثَنَا سُلَيْمَانُ بْنُ بِلاَلٍ، قَالَ حَدَّثَنِي أَبُو حَازِمٍ، عَنْ سَهْلٍ ـ رضى الله عنه ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ إِنَّ فِي الْجَنَّةِ بَابًا يُقَالُ لَهُ الرَّيَّانُ، يَدْخُلُ مِنْهُ الصَّائِمُونَ يَوْمَ الْقِيَامَةِ، لاَ يَدْخُلُ مِنْهُ أَحَدٌ غَيْرُهُمْ يُقَالُ أَيْنَ الصَّائِمُونَ فَيَقُومُونَ، لاَ يَدْخُلُ مِنْهُ أَحَدٌ غَيْرُهُمْ، فَإِذَا دَخَلُوا أُغْلِقَ، فَلَمْ يَدْخُلْ مِنْهُ أَحَدٌ ‏"‏‏.‏

  6. 6
    Hadith Sahih al-Bukhari 1899
    Sahih Bukhari

    In Ramadan the gates of heaven open, the gates of Hell close and the devils are chained.

    Narrated Abu Huraira:Allah's Messenger (ﷺ) said, "When the month of Ramadan starts, the gates of the heaven are opened and the gates of Hell are closed and the devils are chained

    العربية

    حَدَّثَنِي يَحْيَى بْنُ بُكَيْرٍ، قَالَ حَدَّثَنِي اللَّيْثُ، عَنْ عُقَيْلٍ، عَنِ ابْنِ شِهَابٍ، قَالَ أَخْبَرَنِي ابْنُ أَبِي أَنَسٍ، مَوْلَى التَّيْمِيِّينَ أَنَّ أَبَاهُ، حَدَّثَهُ أَنَّهُ، سَمِعَ أَبَا هُرَيْرَةَ ـ رضى الله عنه ـ يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِذَا دَخَلَ شَهْرُ رَمَضَانَ فُتِّحَتْ أَبْوَابُ السَّمَاءِ، وَغُلِّقَتْ أَبْوَابُ جَهَنَّمَ، وَسُلْسِلَتِ الشَّيَاطِينُ ‏"‏‏.‏

  7. 7
    Hadith Sahih al-Bukhari 1903
    Sahih Bukhari

    Allah has no need of the fast of one who keeps lying and doing evil.

    Narrated Abu Huraira:The Prophet (ﷺ) said, "Whoever does not give up forged speech and evil actions, Allah is not in need of his leaving his food and drink (i.e. Allah will not accept his fasting)

    العربية

    حَدَّثَنَا آدَمُ بْنُ أَبِي إِيَاسٍ، حَدَّثَنَا ابْنُ أَبِي ذِئْبٍ، حَدَّثَنَا سَعِيدٌ الْمَقْبُرِيُّ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ لَمْ يَدَعْ قَوْلَ الزُّورِ وَالْعَمَلَ بِهِ فَلَيْسَ لِلَّهِ حَاجَةٌ فِي أَنْ يَدَعَ طَعَامَهُ وَشَرَابَهُ ‏"‏‏.‏

This answer was compiled with the help of AI, using only the verified texts shown here. Every reference links to its source. If you find a mistake, please report it. Updated 2026-09-24

Report an issue

Tell us what is wrong. Every report is read.

What is the problem?