Short answer
Gelatin from halal-slaughtered animals or fish is fine. Most Deobandi muftis hold that pork gelatin, and gelatin from animals not slaughtered Islamically, stays haram because the change in it is not complete. Medicine containing it is allowed only when a qualified doctor says it is needed and there is no halal alternative. Some scholars hold that gelatin is fully transformed and therefore pure.
Istihalah (complete transformation of a substance into a new one) makes an impure thing pure in the Hanafi school, as when wine becomes vinegar. Deobandi muftis generally hold that making gelatin does not change the substance fully, so pork gelatin remains haram, and taking it in medicine is permitted only under need with no halal alternative.
Other madhhabs
- Shafi'i
- Transformation purifies only in a few cases, such as wine turning into vinegar, so gelatin from impure sources stays impure; medicine containing it is allowed only in necessity.
- Hanbali
- In the relied-upon view, transformation does not purify an impure substance, so gelatin from pigs stays impure; medicine with it is allowed only in necessity.
- Maliki
- Many Maliki scholars accept transformation more widely, and some of them regard gelatin as pure for that reason.
Explanation
Gelatin is made from the skin and bones of animals, mostly pigs and cattle. It is used for soft and hard capsules, tablet coatings, gummies, supplements and some vaccines. Gelatin from cattle slaughtered Islamically, or from fish, is halal. The question is gelatin from pigs or from animals not slaughtered Islamically.
The Hanafi school accepts istihalah more widely than most: wine that turns into vinegar is pure, and so is dung that has burnt to ash. The Prophet ﷺ said that tanning purifies a hide, which shows that a process can change a ruling. The debate is whether gelatin is a new substance. Most Deobandi muftis say it is not, since it is produced by breaking down the animal's collagen, which remains in recognisable form. Some other scholars and fiqh councils say it is fully transformed. Follow the scholars you trust, and know that this is a real difference of opinion.
Even on the stricter view, medicine is a case of need. Hanafi texts allow treatment with something forbidden when a skilled doctor says it is needed and no halal alternative exists. The Prophet ﷺ told sick travellers to drink camel milk and urine as a cure, and the Quran lifts sin from the one forced by necessity.
Practical steps:
- ask your pharmacist or doctor for a version in vegetarian (HPMC) or halal capsules
- ask whether it is safe to open the capsule and take the contents, since some medicines must not be opened
- supplements and vitamins are rarely a necessity, so choose halal-certified ones
- never stop a prescribed medicine without speaking to your doctor
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah Al-Baqara 2:173
إِنَّمَا حَرَّمَ عَلَيْكُمُ ٱلْمَيْتَةَ وَٱلدَّمَ وَلَحْمَ ٱلْخِنزِيرِ وَمَآ أُهِلَّ بِهِۦ لِغَيْرِ ٱللَّهِ ۖ فَمَنِ ٱضْطُرَّ غَيْرَ بَاغٍۢ وَلَا عَادٍۢ فَلَآ إِثْمَ عَلَيْهِ ۚ إِنَّ ٱللَّهَ غَفُورٌۭ رَّحِيمٌ ﴿١٧٣﴾
He has only forbidden to you dead animals, blood, the flesh of swine, and that which has been dedicated to other than Allah. But whoever is forced [by necessity], neither desiring [it] nor transgressing [its limit], there is no sin upon him. Indeed, Allah is Forgiving and Merciful.
Pork is forbidden, which is why gelatin from pigs is a concern.
Quran, Surah Al-An'aam 6:119
وَمَا لَكُمْ أَلَّا تَأْكُلُوا۟ مِمَّا ذُكِرَ ٱسْمُ ٱللَّهِ عَلَيْهِ وَقَدْ فَصَّلَ لَكُم مَّا حَرَّمَ عَلَيْكُمْ إِلَّا مَا ٱضْطُرِرْتُمْ إِلَيْهِ ۗ وَإِنَّ كَثِيرًۭا لَّيُضِلُّونَ بِأَهْوَآئِهِم بِغَيْرِ عِلْمٍ ۗ إِنَّ رَبَّكَ هُوَ أَعْلَمُ بِٱلْمُعْتَدِينَ ﴿١١٩﴾
And why should you not eat of that upon which the name of Allah has been mentioned while He has explained in detail to you what He has forbidden you, excepting that to which you are compelled. And indeed do many lead [others] astray through their [own] inclinations without knowledge. Indeed, your Lord - He is most knowing of the transgressors.
What is forbidden becomes allowed when one is compelled by necessity, such as a needed medicine.
Sahih Muslim 366
Sahih... إذا دبغ الإهاب فقد طهر ...
"When a hide is tanned, it becomes pure."
A process can change the ruling of a substance, which is the basis of the discussion on transformation.
Sahih Muslim 1671
Sahih... إن شئتم أن تخرجوا إلى إبل الصدقة فتشربوا من ألبانها وأبوالها ...
"If you wish, go out to the camels of charity and drink from their milk and urine."
Hanafi scholars cite it for allowing treatment with something impure when it is needed.
Where the ruling is recorded
- Radd al-Muhtar (Ibn Abidin), Kitab al-Taharah, Bab al-Anjas, on transformation. An impure substance that completely changes into another becomes pure.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Taharah, Bab al-Miyah, on treatment with the forbidden. Treatment with a forbidden substance is allowed when a cure is known through it and no alternative exists.
- al-Majmu (al-Nawawi), Kitab al-Taharah, Bab Izalat al-Najasah. The Shafi'i limits on what transformation purifies.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.