Short answer
Yes, in the Hanafi school. Making soap turns fat into a new substance, and the Hanafi fatwa is that this complete change (istihala) makes even impure fat pure. So soaps with tallow from unslaughtered animals, or even lard, may be used, though plant-based products are the cautious choice. The Shafi'i and Hanbali schools do not accept this kind of change as purifying.
Soap made from impure fat or oil is pure because the substance has transformed, and the fatwa is on this view because of widespread need. Using such soap, shampoo or lotion is permissible; choosing products without pig-derived ingredients is more cautious.
Other madhhabs
- Shafi'i
- Transformation does not purify an impure substance except in a few named cases, such as wine turning into vinegar, so soap made from lard stays impure.
- Hanbali
- The relied-upon view is like the Shafi'i one, though some Hanbali scholars, including Ibn Taymiyya, held that transformation purifies.
Explanation
Soap is made by reacting fat or oil with an alkali, which turns it into a different chemical substance with different qualities. The Hanafi scholars call this istihala (complete transformation). Their rule, which is followed in fatwa, is that an impure thing that becomes something else takes the ruling of what it has become. Ibn Abidin records that soap made from impure oil is pure, and that the fatwa is on this because people cannot avoid it.
Common ingredients. Many bars list "sodium tallowate", which comes from beef or mutton fat, usually from animals not slaughtered by Muslims. Some older or handmade soaps use lard. Under the Hanafi rule the fat has been changed into soap, so the soap is pure and you may wash with it and pray. Glycerin and stearic acid made from animal fat are usually treated the same way.
The cautious choice. Many Muslims still prefer vegetable soaps made with olive, palm or coconut oil, which avoid the difference of opinion, especially where pig fat is involved. Followers of the Shafi'i school should avoid lard-based products, since their school does not accept istihala here.
Where nothing changes. The rule is about real transformation. Pig fat mixed unchanged into a cream, or a brush made of pig hair, is a different matter; see boar bristle brushes. Product formulas change often, so when a label is unclear, ask the maker or a mufti about that product. Using such soap does not affect your wudu or ghusl; see how to do ghusl.
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:185
شَهْرُ رَمَضَانَ ٱلَّذِىٓ أُنزِلَ فِيهِ ٱلْقُرْءَانُ هُدًۭى لِّلنَّاسِ وَبَيِّنَٰتٍۢ مِّنَ ٱلْهُدَىٰ وَٱلْفُرْقَانِ ۚ فَمَن شَهِدَ مِنكُمُ ٱلشَّهْرَ فَلْيَصُمْهُ ۖ وَمَن كَانَ مَرِيضًا أَوْ عَلَىٰ سَفَرٍۢ فَعِدَّةٌۭ مِّنْ أَيَّامٍ أُخَرَ ۗ يُرِيدُ ٱللَّهُ بِكُمُ ٱلْيُسْرَ وَلَا يُرِيدُ بِكُمُ ٱلْعُسْرَ وَلِتُكْمِلُوا۟ ٱلْعِدَّةَ وَلِتُكَبِّرُوا۟ ٱللَّهَ عَلَىٰ مَا هَدَىٰكُمْ وَلَعَلَّكُمْ تَشْكُرُونَ ﴿١٨٥﴾
The month of Ramadhan [is that] in which was revealed the Qur'an, a guidance for the people and clear proofs of guidance and criterion. So whoever sights [the new moon of] the month, let him fast it; and whoever is ill or on a journey - then an equal number of other days. Allah intends for you ease and does not intend for you hardship and [wants] for you to complete the period and to glorify Allah for that [to] which He has guided you; and perhaps you will be grateful.
Removing hardship is one reason the Hanafi fatwa accepts transformation in soap.
Sahih Muslim 366
Sahih... إذا دبغ الإهاب فقد طهر ...
"When a hide is tanned, it becomes pure."
A process that changes a substance can make it pure, a principle the Hanafis extend to soap.
Where the ruling is recorded
- al-Durr al-Mukhtar with Radd al-Muhtar, Kitab al-Taharah, chapter on impurities. Impure oil made into soap becomes pure, and the fatwa is on this because of need.
- al-Majmu' (Nawawi), Kitab al-Taharah, chapter on removing impurity. The Shafi'i limits on when transformation purifies.
- al-Mughni (Ibn Qudama), Kitab al-Taharah, discussion of impurities that change. The two Hanbali views on transformation.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. 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.