Praise be to Allaah.
The Ramadaan fast and other acts of worship are not valid unless accompanied by the proper intention, because the Prophet (peace and blessings of Allaah be upon him) said: Actions are but by intentions, and everyone shall have but that which he intendedâ€¦ (Narrated by al-Bukhaari, 1; Muslim, 1907)
The intention is subject to the condition that it be made at night, before the dawn comes, because the Prophet (peace and blessings of Allaah be upon him) said: Whoever does not intend to fast before dawn, there is no fast for him. Narrated by al-Tirmidhi, 730. According to a version narrated by al-Nasaa'i (2334): Whoever does not intend to fast from the night before, there is no fast for him. Classed as hasan by al-Albaani in Saheeh al-Tirmidhi, 573. What is meant is that whoever does not intend to fast and resolve to do so from the night before, his fast is not valid.
The intention (niyyah) is an action of the heart. The Muslim should resolve in his heart that he is going to fast tomorrow. It is not prescribed for him to utter it out loud and say, I intend to fast or I will fast tomorrow or other phrases that have been innovated by some people. The correct intention is when a person resolves in his heart that he is going to fast tomorrow.
Hence Shaykh al-Islam Ibn Taymiyah said in al-Ikhtiyaaraat (p. 191):
If it crosses a person's mind that he is going to fast tomorrow, then he has made the intention.
The Standing Committee was asked:
How should a person intend to fast Ramadaan?
The intention is done by resolving to fast. It is essential that the intention to fast Ramadaan be made every night.
Fataawa al-Lajnah al-Daa'imah, 10/246
And Allaah knows best.