It is not permissible to give zakaah to a kaafir except if it is to attract the hearts of those who have been inclined towards Islam.
Ibn Qudaamah said in al-Mughni (4/106):
We do not know of any difference of opinion among the scholars regarding the fact that zakaah cannot be given to a kaafir. Ibn al-Mundhir said: Everyone from whom we acquired knowledge among the scholars is agreed that a dhimmi (non-Muslim living under Muslim rule) cannot be given anything from the zakaah, because the Prophet (peace and blessings of Allaah be upon him) said to Mu’aadh: “Teach them that they are obliged to give zakaah, to be taken from their rich and given to their poor.” He specified that it was to be given to their poor, i.e., the poor Muslims, just as he specified that it was to be taken from their rich. End quote.
If a kaafir is one of those who is inclined towards Islam, then he may be given something from the zakaah,
Allaah says (interpretation of the meaning):
“As-Sadaqaat (here it means Zakaah) are only for the Fuqaraa’ (poor), and Al‑Masaakeen(the poor) and those employed to collect (the funds); and to attract the hearts of those who have been inclined (towards Islam); and to free the captives; and for those in debt; and for Allaah’s Cause (i.e. for Mujaahidoon — those fighting in a holy battle), and for the wayfarer (a traveller who is cut off from everything); a duty imposed by Allaah. And Allaah is All-Knower, All-Wise”
It is permissible to give zakaah to a kaafir, if we hope that by giving him something he will become Muslim.
See al-Sharh al-Mumti’, 6/143-145
Ibn Qudaamah said in al-Mughni, 4/108:
The kaafir should not be given anything of the zakaah unless he is one of those who are inclined towards Islam.
It says in al-Mawsoo’ah (14/233):
Zakaah may be given to a kaafir who we hope will become Muslim, to encourage him to become Muslim because he is inclined towards Islam. End quote.
Shaykh Ibn Baaz was asked:
Is it correct to give zakaah to a dhimmi?
According to the majority of scholars, zakaah cannot be given to a dhimmi or any other kaafir. This is the correct view, and there are many verses and ahaadeeth which speak of this. Zakaah is a means of help given by the Muslims to their poor, and to take care of their needs, so it must be distributed among their own poor and others among the eight categories mentioned in the verse, unless there are kaafirs who it is hoped will become Muslim, namely the leaders who are obeyed among their tribes, who may be given zakaah in order to encourage them to become Muslim, or so that they will withhold their evil from the Muslims. Zakaah may also be given to new Muslims, to strengthen their faith or to encourage their peers to become Muslim too, or for other reasons that have been stated by the scholars.
The basic principle concerning that is the verse in which Allaah says (interpretation of the meaning):
“As-Sadaqaat (here it means Zakaah) are only for the Fuqaraa’ (poor), and Al‑Masaakeen(the poor) and those employed to collect (the funds); and to attract the hearts of those who have been inclined (towards Islam)…”
And the Prophet (peace and blessings of Allaah be upon him) said to Mu’aadh ibn Jabal when he sent him to Yemen:
“Call them to testify that there is no god but Allaah and that I am the Messenger of Allaah. If they obey you in that, then teach them that Allaah has enjoined upon them five prayers each day and night. If they obey you in that, then teach them that Allaah has enjoined upon them charity (i.e., zakaah) to be taken from their rich and given to their poor.” Agreed upon.
See also question no. 21384.