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.
It is permissible to conceal the news of pregnancy and hide it from friends, family and others, as this is among the matters which the Sharee‘ah has kept silent about, so by default it is permissible and authorized.
Abu Ad-Dardaa’ narrated that the Messenger of Allaah said:
“"What Allaah has made lawful in His Book is lawful and what He has forbidden is forbidden, and whatever He has kept silent about is allowed as His favor. So accept Allaah's favor, for Allaah is not forgetful of anything." He then recited, {And never is your Lord forgetful.} [Quran 19:64].” [Al-Bazzaar - Al-Albaani graded it Saheeh (sound)]
Allaah Knows best.