I would like to position a service offering online prior to registering an LLC, to test the market. Once I have potential interest/buyers, I will not transact until I have registered the LLC. Is that still within restrictions of the H4 visa? Would that still be considered illegal?
Disclaimer, I'm not an lawyer, this is purely speculative.
The rules are fairly simple. On H4 you cannot profit from any business or work in US.
However that's when things get interesting. If the LLC would not generate any profit, but re-invest 100% of it's revenue into growth, that in theory would be legal. Then you could in theory grow the business until it reaches the size that it would be possible to obtain investor visa.
Here is BBC America take on the subject, mention as one of the points in "Six (Legal) Ways to Earn Money in the U.S. Without a Work Visa":
Invest in a Business
You can plumb money into a venture so long as you’re an entirely passive party, which means you can’t actually work for the business. So, if a friend wants to open a restaurant and you want to invest, that’s fine. What’s not fine is for you to take on shifts, or even help with the behind the scenes running of the joint. But there’s nothing to stop you taking the time to evaluate investment opportunities and drill potential partners on how they’ll be spending your cash.
Thats a very thin line though, so I'd suggest that you'd consult your immigration attorney. Do NOT take random legal advice from internet.
As other answers have eluded, you can (most likely) set up a legal entity as a business in the US on your visa (or on any visa, or even without entering the USA at all), but an LLC may not be the best choice. A C-Corp is probably better if you are not permitted to work in the US, but consult with a tax attorney. However, you still cannot do work for that company while in the USA. You can be an investor in a US-based company which hires others (who have legal authorization to work) to do work in the USA.
Whether you can actually do the "work" of forming and managing a company while in the USA may be a sticky matter, and you should consult an attorney.
But it sounds like your goal is to bypass labor restrictions on your visa, and an LLC won't help you do that.