As titled. There are a ton of examples to congratulate newborns, however, is there anything similar before the birth of a new baby?
It is customary to say “congratulations” to prospective parents from the moment they have officially announced their pregnancy. You don’t need to wait until the baby is born to say it.
As a sentence, and depending on your personal style, I would say something like: “Congratulations on your happy/wonderful news!” - or “That’s wonderful/exciting news - congratulations!”
In terms of politeness, your next step would be to ask after the expectant mother’s health and comfort, and to wish her well for the coming months.
A small tip: Try to be sure that she is expecting before you do say ‘congratulations’, to avoid any embarrassing comment on weight gain! And checking that it’s ‘official’ before congratulating her in front of coworkers or family would also be polite.