Short answer
No. Dirt and mud are pure, and Hanafi scholars excuse street mud and puddle splashes on your clothes because people cannot avoid them, unless you can actually see impurity in them. Shoes with dried impurity that has a body can be cleaned by rubbing them on the ground.
Soil is pure and purifying. The mud and water of streets are excused out of necessity and do not prevent prayer unless the impurity itself is seen in them. Shoes with impurity that has a body are purified by rubbing on the ground until the trace is gone.
The four schools agree on this.
Explanation
A woman told Umm Salamah that she let her hem trail on the ground and walked through dirty places. Umm Salamah quoted the Prophet ﷺ: what comes after it purifies it. Scholars take this to mean that walking over clean ground afterwards cleans what the hem picked up, and that people are not burdened with checking every splash.
Practical rules (Hanafi):
- Dirt, dust and clean mud: pure. You can pray with them on your clothes, though it is better to brush them off.
- Splashes from rain puddles and wet streets: excused. You do not need to change before praying.
- If you clearly see impurity in the mud, such as animal droppings: wash that spot.
- Shoes: if they step in impurity that has a body, like dung, rubbing them on the ground until no trace remains makes them pure. Urine on shoes, which has no body, is washed.
The Prophet ﷺ once took off his sandals during prayer because Jibril told him there was dirt on them, and he told people to check their sandals and wipe off any dirt before praying in them. This supports wiping as enough for footwear.
The four schools agree that soil is pure and that ordinary street mud is excused; they differ on details such as cleaning shoes. Clean earth is also what tayammum is made with: see how to make tayammum, and for other impurities, types of najis.
The evidence
Sunan Abi Dawud 383
Grading to be checked... قال رسول الله صلى الله عليه وسلم يطهره ما بعده ...
"The Messenger of Allah said: What comes after it purifies it."
Ground passed over later cleans what a hem picked up, so ordinary street dirt is not a burden.
Sunan Abi Dawud 650
Graded sahih... فإن رأى في نعليه قذرا أو أذى فليمسحه وليصل فيهما ...
"If he sees dirt or filth on his sandals, let him wipe it off and pray in them."
Wiping is enough for footwear.
Where the ruling is recorded
- al-Hidaya, Kitab al-Taharat, chapter on impurities and their purification. Footwear with impurity that has a body is purified by rubbing on the ground.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Taharah, chapter on impurities. Street mud is excused unless the impurity is seen in it.
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.