All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Saying ‘Bismillaah’ (In the Name of Allaah) when starting ablution is desirable but not an obligation according to the view of the majority of the scholars and if one does not say it, his ablution is valid as we clarified in Fatwa 94316.
The view we adopt in Islamweb is that if a person performs ablution inside the toilet, then the most preponderant opinion of the scholars is that he should not say the mention of Allaah that is said when performing ablution out of glorifying the mention of Allaah. Therefore, it is disliked for a person who is inside the toilet to mention Allaah even for performing ablution. Whoever wants to perform ablution inside the toilet, then he can mention the Name of Allaah immediately before entering, and then he enters and performs ablution. This is more appropriate to do than mentioning Allaah inside the toilet. However, some scholars permitted mentioning Allaah when performing ablution in the toilet. For instance, Ibn ‘Uthaymeen said: “If a person wants to perform ablution inside the toilet, he should say ‘Bismillaah’ even inside the toilet and he is not sinful for this because the word ‘Bismillaah’ is not a Quran; rather, it is a kind of mention of Allaah, but if he says it in his heart and not with his tongue, then this is good, and if he does not say it either by his heart or with his tongue, he is not sinful.” He also said: "Saying ‘Bismillaah’ in the toilet and the like is permissible because most of the toilets that we have nowadays are clean because water removes the impurity and takes it away, and if one wants to say ‘Bismillaah’ in his heart only without uttering it with his tongue, then this is good.”
For more benefit, please refer to Fatwa 89224.
Allaah Knows best.