All Perfect Praise be to Allah The Lord of The Worlds. May His Peace and Blessings be upon our Prophet Mohammad and upon all his family and companions.
Urea is fundamentally an organic compound secreted by the bodies of human and many animals to eliminate nitrogen, and it is usually expelled from the body through urine. Nowadays, it can be produced industrially and is used in various products such as livestock feed, fertilizers, pharmaceuticals, plastics, and melamine, among others.
Industrial urea is considered pure and there is no harm in using it, as it is composed of pure materials. It is made from the reaction of ammonia gas with carbon dioxide gas under high pressure estimated at around 140 kg/cm². The jurisprudential principle states: "The default ruling on things is purity."
As for organic urea extracted from urine, it is considered impure due to its mixture with urine. If it is used for medicinal purposes—which is quite rare—it is permissible, provided there is no pure alternative. Scholars have permitted the use of impure substances for medical treatment, excluding pure alcohol, when no alternative is available. Imam Al-Shirbini Al-Shafi'I (May Allah have mercy on him) said: "Note: "The disagreement is about treating with pure alcohol." As for antidotes mixed with it or similar substances where it is consumed, it is permissible to use them for treatment in the absence of alternatives that achieve the same medicinal benefit from pure substances, like treating with impure substances such as snake meat and urine, even if the treatment is for hastening recovery, provided a trustworthy Muslim doctor confirms its use or the individual has knowledge of its medicinal benefits" [Mughni Al-Muhtaj, vol. 5/pp. 518].
Likewise, if other substances are added to it, changing its properties and transforming it into a different substance, it is considered pure and permissible to use according to the Hanafi school of thought. The Hanafi scholars state that impure substances, when transformed into entirely different pure substances—losing their original properties—are considered pure. This process is known as Istihala (transformation). Imam Ibn Al-Humam Al-Hanafi (May Allah have mercy on him) said: "Because the Sharia has attached the description of impurity to that specific entity, and the entity's nature is annulled with the annulment of some parts of its concept, let alone the whole. An example of this in Sharia is the semen, which is impure, then it turns into a clot, which is also impure, then it becomes a lump of flesh and becomes pure. Similarly, grape juice is pure, then it becomes wine and becomes impure, then it turns into vinegar and becomes pure. We understand from this that the transformation of the entity entails the removal of the attribute assigned to it" [Fath Al-Qadeer, vol. 1/pp. 200].
In conclusion, there is no sin in using synthetic urea in cosmetic and medical products, as it is pure. The same applies to organic urea if it undergoes transformation. It is also permissible to use organic urea for treatment, even if it has not transformed, provided there is no alternative and no harm in its use. The reference for determining this is the authorities responsible for monitoring and approving the manufacture of medicines. And Allah The Almighty Knows Best.