The mask mandate, which will come into force Wednesday, applies to all individuals, whether vaccinated or not.
Los Angeles, San Francisco and other counties in California reintroduced the mask-wearing rule locally several months ago.
But other counties, such as Orange and San Diego, which are very heavily populated, had stuck with state-wide rules that masks only needed to be worn in certain public spaces such as airports, hospitals or schools but not in shops, restaurants or cinemas.
California's Health Secretary Mark Ghaly said the rapid rise in Covid-19 cases had prompted the new rule. There has been a 47 percent increase in cases since the Thanksgiving holiday at the end of November.
The number of new daily cases of coronavirus in California has risen from 9.6 per 100,000 to 14 per 100,000 during that time. Ghaly said that wearing a mask could help prevent a repeat of last winter's high rates of infection and death.
"This is a critical time where we have a tool that we know has worked and can work," Ghaly said. "As we look at the evidence that masks do make a difference, even a 10 percent increase in indoor masking can reduce case transmission significantly."
The mask mandate will remain in place until January 15.
California has also clamped down on unvaccinated people wishing to attend gatherings of more than 1,000 people in an enclosed space. Unvaccinated attendees will have to provide a negative Covid-19 test taken less than 24 or 48 hours (depending on the type of test) earlier, as opposed to 72 hours previously.
California's announcement came the same day that similar restrictions were imposed in New York City.