Do I have to tell my job I am pregnant?

Last time I had a meeting with my boss to tell him and plan my leave etc... I ended up having a very bad experience that made work a hostile environment for me at that time even though I love my job overall.

I feel like just going about my job and wearing loose clothing and not actually informing them even once it has become very obvious (which I have heard can be quite early on for #2 - eep).

Am I actually under any obligation to tell them? Is it totally crazy not to? Has anyone done this?