I am on H1B. I love technology and work on small idea while having time during weekends. I want to shape my idea and setup a startup but don't want to monetize it. Does it still call business as I am not earning from it ? Can I do it on H1B ? It is purely because my interest and not for earning.
Yes. Yes you can work on a start-up on the side in accordance with your H1B visa as you are not earning direct or indirect income from it.
Make sure that your sponsoring company also allows you to be working on an outside business, especially if your skills and service to them-- and the startup overlap in any way.
The answer by @Joseph is unfortunately incorrect. H1B person can only work for an employer stated on the approved petition, no other employer. Compensation doesn't matter, even volunteering is prohibited in many cases (unless volunteering for an charitable non-profit organization that doesn't have employees at all, like a local church or the Red Cross, even that may be problematic).
You can do hobby, but "setting up a startup" doesn't sound like a hobby. Building classic cars in your garage not for sale does.
See this question for more opinions.