Is it obligatory to wash hands and feet (or maybe also face) before prayer? If it is, what is it based on?
Absolutely it is, it's called wudu' and it's not just washing hand and feet, the full wudu' is as follows:
- Begin by saying ‘Bismillah’.
- Wash your hands up to the wrists thoroughly three times.
- Rinse your mouth three times, swirling the water around and rinse your nose three times, blowing the water out using the left hand to remove the water from your nose. The secret of this sunnah is that it lets you check if the water is pure and clean enough to use for wudu!
- Make your intention that you are now performing the fard (obligatory) actions of wudu.
- Wash your face three times, from the hairline to the chin and from ear to ear, making sure the whole face, eyebrows, under the nose and lips are washed. A man should wash the hair of his beard. If his beard is thin, he should make sure water reaches the skin, and if it is thick he should wash the surface and run his wet fingers through it.
- Wash your arms and hands from your fingertips up to your elbows three times. It is essential to remove anything that could prevent the water from reaching the skin i.e. dough, mud, paint etc.
- Wipe your head starting with your hands at the front of your head, bringing them to the back of your head and then back to the front again. With regards to a woman’s hair, she should wipe it from the front of her head to the roots of the hair at the nape of her neck. She does not have to wipe the entire length of her hair.
- Wipe your ears by putting your index fingers in your ears and wiping the back with your thumbs. Its preferable to use fresh water for this.
- Wash your feet three times up to the ankles, making sure to wipe in between your toes with your little finger. Don’t forget the back of your ankles.
- Finish your wudu with the dua - Ash-hadu ’an laa ’ilaaha ’illallaahu wahdahu laa shareeka lah, wa ’ash-hadu ’anna Muhammadan ’abduhu wa Rasooluh.
The Qur'an says "For God loves those who turn to Him constantly and He loves those who keep themselves pure and clean."[2:222] In regard to Muslims being required to be clean when handling and reading the Qur'an, the Qur'an says, "Which none shall touch but those who are clean."[56:79] The Islamic prophet Muhammad said that "Cleanliness is half of faith."
Description in Hadith Wudu in Hadith Abu Hurairah, in reference to the Day of Resurrection, reported that Muhammad, when asked if he would be able to recognise Muslims, said, "Yes, you would have a mark which other people will not have. You would come to me with a white blaze on your foreheads and white marks on your feet because of the traces of ablution."
Abu Hurayra said, "I have heard prophet (may peace be upon him) say. In a believer adornment would reach the places where ablution reaches."
Uthman stated that Muhammad said, "He who performed ablution well, his sins would come out from his body, even coming out from under his nails."
Umar reported that Muhammad said, "No one among you does wuḍūʾ and does wuḍūʾ thoroughly – or adequately – and then testifies, 'There is no god but Allah Alone with no partner and I testify that Muhammad is Allah's Messenger', without the eight doors of the Garden being opened to him so that he can enter by whichever of them he wishes."
Washing hands, arms, face, wiping over the head and washing feet before prayer (salah) is part of wudu. It is required for prayer to be acceptable.
يا أيها الذين آمنوا إذا قمتم إلى الصلاة فاغسلوا وجوهكم وأيديكم إلى المرافق وامسحوا برءوسكم وأرجلكم إلى الكعبين
O you who have believed, when you rise to [perform] prayer, wash your faces and your forearms to the elbows and wipe over your heads and wash your feet to the ankles.
لا يقبل الله صلاة أحدكم إذا أحدث حتى يتوضأ
Allah does not accept prayer of anyone of you in a state of impurity until he performs ablution
However it is not obligatory to perform wudu before every prayer. Rather wudu is a state and it is only obligatory to perform it before a prayer if the wudu from your previous prayer has been broken. See Which things break the wudu? for a list of events which break wudu.
Once you apply wudu the first time you dont have to apply again if you did not pass gass ( but you can if you want to/ encouraged) You only apply wudu again if you passes gas or answered the call to nature.
O you who believe, when you rise for Salāh, (prayer) wash your faces and your hands up to the elbows, and make MasH (wiping by hands) of your heads and (wash) your feet up to the ankles. If you are in a state of major impurity, cleanse yourselves well (by taking bath). If you are sick, or on a journey, or if one of you has come after relieving himself, or you have had sexual contact with women, and you find no water, then, go for some clean dust and wipe your faces and hands with it. Allah does not like to impose a problem on you; He, rather likes to cleanse you and to complete His favour upon you, so that you may be grateful. Quran (5:06)
There is more than one way to do wudu This is description from quran
Then there is that from sunnah