Fiqh-us-Sunnah Volume 3, Zakaat and Fasting, Fiqh 3.010A.

Section : The Niyyah (Intention).

Since the payment of zakah is an act of worship, its validity depends upon the expression of one’s intention. That is, the zakah payer should pay it for the sake of Allah; he should make up his mind, with all of his heart, that zakah is an obligation to be discharged. Allah says: “And they are commanded no more than this: to worship Allah, sincere in their faith in Him alone” [al-Bayyinah 5].

It is related in al-Bukhari and Muslim that the Prophet, upon whom be peace, said: “The value of [one’s] deeds is determined by [one’s] intentions; and thus for each shall be according to his intentions.” Malik and ash-Shaf’i say that the intention is to be made at the time of rendering zakah. Abu Hanifah holds that the intention must be present at the time of payment or when zakah is being set aside from one’s assets. Ahmad’s view is that it is permissible to express the niyyah a little earlier before payment.