First and foremost, we would like to stress that all Muslims should be keen to keep their fasting intact by avoiding any act that is capable of rendering their fasting invalid. This is because fasting during the month of Ramadan is a unique opportunity for Muslims to get their sins forgiven. Thus, all Muslims are to educate themselves about things that invalidate fasting or may negatively affect it.
The Islamic Religious Council of Singapore issued the following fatwa: We would like to point out that fasting will not be invalidated as long as an external object does not reach the most internal part of our open organs, which are mouth, nose, ears and private parts.
With regards to the mouth, if an external object gets into the mouth, one should spit it out and not swallow it. Thus, brushing teeth, gargling water or mouth rinse, and even using toothpicks will not invalidate fasting as long as they are not swallowed, and enough effort has been spent to eject those materials outside the mouth.
With regards to the nose and ear, if an external object enters it but remains close to the opening, then fasting will not be invalidated. But if the object goes deep into the nose and ear, fasting will be invalidated.