Praise be to Allah.
Shaykh Ibn Baz (may Allah have mercy on him) was asked about using toothpaste whilst fasting.
“There is nothing wrong with that so long as one is careful to avoid swallowing any of it, just as it is prescribed in Islam for the fasting person to use the siwak (tooth-stick).” (Fatawa al-Shaykh Ibn Baz, 4/247)
Shaykh Muhammad al-Salih ibn ‘Uthaymin said:
“… This leads us to the question: Is it permissible to use a toothbrush and toothpaste whilst fasting or not?
The answer is that it is permitted, but it is preferable not to use them because the toothpaste is too strong and may go down into the throat. Instead of doing that during the day, one should do it at night.” (Al-Sharh al-Mumti’ by Ibn ‘Uthaymin, 6/407-408)
And Allah knows best.