You asked

How do I tell my toddler I'm pregnant?

You must realise that your two year old probably does not have the vocabulary or cognitive ability to understand that you have a baby growing inside you. It is much better to tell your child once you actually have a big tummy, as they will be able to see more or less what you are talking about.
If you do mention to your little one that there is a baby on the way, and you want to keep it a secret from family and friends for a while, then accept that it is not going to be a secret for very much longer - they are going to tell everyone they meets that mommy is going to have a baby, even if they do not quite understand what is going on.
On the other hand, once you have told family and friends, it will be really hard to keep it from your two year old, as everyone is going to be congratulating you openly and your little one is going to hear about it anyway. So it is far better for your toddler to hear it from you rather than someone else.
If and when you are feeling nauseous or very tired, it will be easier if you simply tell your toddler that you are feeling very tired or are not feeling well. It will not be a good idea to tell your little one that it is the new baby who is making you feel this way - your toddler will resent the new baby for making mommy ill.
Also, when you are ready to tell your toddler about the new baby, make sure it is at a time when they are completely relaxed and not worried about other changes in their life, such as starting pre-school or perhaps getting over a bad cold. It is also a good idea to avoid telling them this news just before bedtime. It will also help a great deal if both parents are involved in telling the news.
If you are extremely unfortunate enough to have a miscarriage, then tell your toddler that the baby did not grow big enough to be born, and that you are going to try again some time to grow another baby.
The sadness that you might feel after your miscarriage is fine. Your toddler will probably show sadness as well, but this is not because of the loss of your baby, but rather because you yourself are sad. Help your child to control their feelings by listening to them as well as taking care of your own emotions - once they see you feel better, they will as well.
Before telling your little one about the new baby, you can help them to get prepared for the news by reading one of the many books about babies and siblings. Or you can talk about other children and their siblings, and tell your toddler that they might be lucky enough one day to have a brother or sister of their own.
When you do tell your toddler about your pregnancy, do not expect them to be too interested at that moment. They really do not understand what is going on, and will probably try to direct your attention to something else. If your toddler does seem to be excited by the news, then tell them to help you to tell Grandma and Grandpa or some other important person. Even if these other people are already aware of your pregnancy, your toddler will feel very important that they are involved in something that is such big news.
On the other hand, if they seem upset or confused by your news, then let them know that you can see that they are sad, and offer to hold them. This way, you are letting them know that it is quite okay to feel the way they are feeling.
Now that your child knows about your pregnancy, wait for them to ask questions or show an interest in learning more about what is happening. It is not necessary to force them to know more than they want to know.

More questions

Talking to an older child about a new baby is easier than explaining to a toddler or preschooler
How can you explain to a toddler that their is another baby on the way?
It is certainly possible to breastfeed while you are pregnant but you will need to get extra rest and nutrition. 
Getting older children to accept a new sibling can be a tricky proposition, but with time, patience and a bit of ingenuity, it is possible.
Whether or not having two or more children sharing a room will work for your family depends on a variety of factors.
The decision to have a second child is a difficult one to make. Openly sharing your concerns and discussing the implications with your wife is the best course of action.
While you may want your older children to be involved in caring for your new baby, it’s not always the best idea. There are other options however.
Signs that your toddler is progressing properly