The wealth should be free of debt
One among the conditions of Zakaat is that the wealth should be free of debt. If an individual has wealth that meets the prescribed criterion of Zakaat and that person has such debts that on subtracting the debt from the wealth that person’s wealth doesn’t meet the prescribed criterion of Zakaat, then the Shariah doesn’t impose Zakaat on such a person. However, if that person has such wealth that even after subtracting the debts, that person’s wealth meets the prescribed criterion of Zakaat, then Zakaat will be Compulsory (Wajib) on that person.
As given Al Bahr Ur Raaiq, Vol. 2, Pg. No. 357.