I would tell the people who are closest to you when you feel the time is right. Some people are not close to their parents, so they might want to tell close friends before hand. It's up to you. Just make sure you're ready to let the world know, because as I have found, once you tell a few people the news spreads quick. Good luck!
I only told my 2 sisters and best friend. When the doctor said everything was ok (almost 3 months) we told everyone. I was worried in case something happened. I did not tell my mom as I knew she would tell the world.
After losing my first pregnancy I waited around 3 months before telling anyone to make sure everything was okay. We told our parents and then everyone else. On my next pregnancy we didn't wait we told our parents first and then everyone else again.