Short answer
In a hadith qudsi Allah says every deed of the son of Adam is for himself except fasting, which is for Him, and He Himself will reward it. The scholars explain that fasting is a hidden act that is hard to show off, that no one has ever worshipped anyone else by fasting, and that its reward is not limited to the usual tenfold but is given by Allah without measure.
This is a matter of virtue, not a ruling. Scholars of every school explain the hadith in similar ways and agree it shows the special rank of sincere fasting.
The four schools agree on this.
Explanation
Abu Hurayrah reported that the Prophet ﷺ said: Allah said, every deed of the son of Adam is for him except fasting; it is for Me, and I will reward it. Fasting is a shield. The breath of the fasting person is more fragrant to Allah than musk, and the fasting person has two joys: when he breaks his fast, and when he meets his Lord.
Why fasting is "for Me". All deeds are for Allah, so the scholars asked why fasting is singled out. Their main explanations:
- It is hidden. Prayer and charity can be seen. Fasting is a matter between you and Allah. Only He knows whether you secretly drank. So it is the deed least open to showing off.
- No one is worshipped by it besides Allah. People have bowed and offered sacrifices to idols, but no one fasted to an idol in the way Muslims fast for Allah.
- Its reward is unmeasured. Other deeds are multiplied from ten to seven hundred times. Fasting is patience, and Allah says the patient are given their reward without account. So He keeps its reward to Himself.
Living the hadith. A shield protects only if it is whole. The same hadith says that a fasting person should not use obscene speech or shout, and if someone insults him, he should say: I am fasting. Guard the fast from lying and anger so that its special reward is not lost. See sins in Ramadan, the gate of al-Rayyan and hadith about Ramadan.
The evidence
Quran, Surah Al-Baqara 2:183
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ كُتِبَ عَلَيْكُمُ ٱلصِّيَامُ كَمَا كُتِبَ عَلَى ٱلَّذِينَ مِن قَبْلِكُمْ لَعَلَّكُمْ تَتَّقُونَ ﴿١٨٣﴾
O you who have believed, decreed upon you is fasting as it was decreed upon those before you that you may become righteous -
The aim of fasting is taqwa, which is rooted in the heart.
Sahih al-Bukhari 1904
Sahih... كل عمل ابن آدم له إلا الصيام فإنه لي وأنا أجزي به ...
"Every deed of the son of Adam is for him except fasting: it is for Me, and I will reward it."
The hadith qudsi on the special rank of fasting.
Sahih al-Bukhari 1904
Sahih... فإن سابه أحد أو قاتله فليقل إني امرؤ صائم ...
"If someone insults him or fights him, let him say: I am a person who is fasting."
The fast is a shield that must be guarded with good conduct.
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.