Is any kind of license needed in the US to give mortgage advice to the public?
What are the relevant rules and regulations?
Does it matter if this is free advice or payed?
Does it matter if the advice is given face to face or online?
There are perhaps three areas you should investigate.
First, look into "Certified Financial Planner" (CFP) certification. There is a good Wikipedia article on line.
Next, you should be familiar with the real estate licensing laws covering brokers and salespersons and what activities require licensing. These are covered in the Business & Professions Code, starting at section 10150, but I'd suggest trying to get a discussion with someone at the Department of Real Estate who can evaluate what you plan to do and tell you specifically which proposed activities would require a DRE salesperson's or broker's license (probably the latter).
Finally, you should investigate and be at least somewhat familiar with the Federal licensing for the securities business. Most of the potentially applicable Federal licensing is done by FINRA, the Financial Industry Regulatory Authority. Stockbrokers must pass the so-called Series 7 FINRA exam; I doubt this would apply to someone doing nothing more than giving mortgage advice, but quite possibly some other FINRA exam may apply.
Well, there are three starting points for you, at least.