It may only be distributed to the eight kinds of recipients that are mentioned in the verse in Sūrah al-Tawbah [v.60]
[Q]: What is the ruling on using Zakāh money to finish building a masjid that is almost completed, and its construction may be halted (due to lack of funding)?
[A]: What is well-known to the scholars, and it is the position of the vast majority of them, so it can be considered like ijmāʿ’ (a scholarly consensus) of the scholars of the early al-Salaf al-Ṣāliḥ, is that Zakāh is not to be used for building masjids, buying books, or the likes. It may only be distributed to the eight kinds of recipients that are mentioned in the verse in Sūrah al-Tawbah [v.60], and they are:
(1) the fuqaraa’ (those who are extremely poor),
(2) the masaakeen (the poor and needy),
(3) those who work in distributing it,
(4) those whose hearts are inclined towards Islām,
(5) freeing slaves,
(6) paying debts,
(7) in the way of Allāh, and
(8) the traveler who is in need. And the phrase “in the way of Allāh” means jihād specifically. This is what is known to the people of knowledge, and the building of masjids is not mentioned here, nor is the building of schools or roadways, nor their likes. And Allāh is the One who grants success.
[ Source: Majmūʿ Fatāwá wa Maqālāt Mutanawwa’ah (14/294) ] Translated by Abū al-ʿAbbās Mūsá Richardson