The intention of fasting (Niyyah) is a firm resolution of the heart that one is worshipping Allah by fasting.
The Messenger of Allah peace and blessings upon him said:
“Verily, the action is (judged) by the intention (behind it).”
It obligatory to make the intention every day one intends to fast.
The intention is an action of the heart and therefore there is no actual requirement for one to utter any words to make Niyyah.
It is better to confirm the intention by praying the supplication (Dua’) with the tongue.
If the intention is made at night then one should intend/say "I have made the intention for the fast of Ramadaan for Allah which I will keep tomorrow"
If the fast is made before midday then one should intend/say “I have made the intention for the fast of Ramadaan for Allah which I will keep today".
It is obligatory to make Niyyah for all types of fast, whether obligatory, necessary or voluntary, within its prescribed time (Ada') or made up afterwards (Qada').
If a person abstains from all things that break one’s fast without making the intention of fasting within the prescribed time, the fast will simply not be valid.
There are two types of fasts in this regard.
1) The category in which it is neither obligatory to intend in advance nor to specify the fast one is observing:
- A fast of Ramadaan (during the month).
- A vow in which the time is specified such as, one saying "I vow to Allah to fast this Sunday".
- A voluntary fast (Nafl).
For these fasts, they are valid even if one does not intend from the night since it is permissible to intend once the day has begun until the Sharia'h Midday nor is it conditional to specify it. So if one says, "I am fasting tomorrow." without specifying whether one is observing a fast of Ramadaan, a time specific vow fast, of a voluntary fast then it will still be valid.
If one makes Niyyah after dawn one must make the intention that one is fasting the fast of that day and that one has been fasting from the break of dawn. In this instance, if one makes the intention that one has commenced fasting from the time the intention is made, the fast will not be valid (as its condition of a valid fast that the fast is for the whole day)
2) The category in which it is obligatory to intend in advance before the break of dawn and to specify the fast one is observing:
- Making up a fast of Ramadaan (Qada').
- A Kaffarah (Expiation) fast.
- Making up an invalidated voluntary fast.
- A vow in which the time is unspecified such as, one saying, "I vow to Allah to fast a day."
In these categories, the timing of the intention must occur just after sunset to just before dawn. It is also necessary for one to specify the type of fast one is observing. Therefore, if one does not intend to fast from the night or does not specify the fast one intends to observe, one's fast will not account for what is due, but one will receive the reward of a voluntary (Nafl) fast. For example, “I am keeping a Qada’ fast for such and such a previous missed fast” or “I am keeping a Vowed fast for such and such a thing fulfilled”.

In Arabic known as Nisf al-Nahar Shar’iah or al-Dahwah al-Kubra, it is the half way point during the hours of daylight i.e. between the start of Fajr and Maghrib.
For example:
The start of Fajr (Subh al-Sadiq) is at 5 am and Maghrib is at 8 pm.
The length of the day is therefore 15 hours and half of this is therefore 7.5 hours.
Nisf al-NaharShar’iah would, therefore, occur at 12:30 pm (5 am + 7.5hrs).
وَبِصَوْمِ غَدٍ نَوَيْتُ مِنْ شَهْرِ رَمَضَانَ
Transliteration:
Wa bi - sawmi ghadin nawaytu min shahri Ramadaan"I intend to keep the fast for tomorrow in the month of Ramadan"
[Abu Dawud]
اللَّهُمَّ اِنِّى لَكَ صُمْتُ وَبِكَ امنْتُ [وَعَلَيْكَ تَوَكَّلْتُ] وَعَلَى رِزْقِكَ اَفْطَرْتُ
Transliteration:
Allahumma Inni laka sumtu wa bika amantu [wa alayka tawakkalto] wa ‘ala rizqika aftartu"O Allah! I fasted for You and I believe in You [and I put my trust in You] and I break my fast with Your sustenance."
[“wa ‘alayka tawakkaltu” is quoted in some books of knowledge – but not all, hence it is in brackets]
[Abu Dawud]
