As for uttering the intention, this is not legislated at all; voicing it aloud is a blameworthy innovation, because the intention is an act of the heart—an inner resolve known only to Allah. Nothing has been transmitted from the Prophet ﷺ to indicate that he ever verbalised his intention by saying, for example, “O Allah, I intend to fast,” or “I intend to pray,” or the like. The sole exception occurs when one enters the state of ihram for ḥajj or ʿumrah, where the Muslim says, “I intend to enter ihram for ʿumrah,” or, “I intend to enter ihram for ḥajj,” and when slaughtering a hady or an ʿudhiyah. In that situation he verbalises, saying, “O Allah, this is on behalf of so-and-so, son of so-and-so; accept it from me, for You are the All-Hearing, the All-Knowing.”
These two occasions alone—assuming ihram for the pilgrimage rites and slaughtering an animal offered as an ʿudhiyah or a hady for tamattuʿ or qirān, or any other sacrificial offering—allow verbal declaration. In every other act of worship, pronouncing the intention is an innovation, whether in fasting, prayer, or anything else, because no report exists that the Prophet ﷺ ever verbalised the intention in any of these circumstances. He ﷺ said, “Whoever performs an action that is not in accordance with our affair, it is rejected,” and he ﷺ also said, “Beware of newly introduced matters, for every newly introduced matter is an innovation.”
Therefore, articulating the intention before prayer, fasting, or any other act of worship is something the Messenger ﷺ neither did nor commanded; it is an innovation. Allah, the Exalted, says: “Say, ‘Are you teaching Allah about your religion while Allah knows what is in the heavens and what is on the earth? And Allah is Knowing of all things’” (al-Ḥujurāt 49:16).