The rules are being introduced as the country is seeing a steady rise in infections amid colder weather, with officials recording 96,367 new cases in the past 24 hours, around double the number recorded a week ago.
Health Minister Karl Lauterbach called the new rules strict compared with other European countries but said Germany was being "not smarter but more cautious" in its approach.
What are the new rules?
From Saturday, passengers over the age of 14 on long-distance trains will be obliged to wear FFP2 masks — similar to the US-standard N95 respirator — rather than the less-protective surgical masks that have hitherto been compulsory.
Health ministers in all 16 German states have agreed that passengers on local buses and trains will be required to wear at least surgical masks, although that is not mandatory under the new federal rules.
Air travelers will, on the other hand, be able to dispense with masks, which is in line with the practice of other EU countries and airlines.
FFP2 masks are now also to be worn in hospitals, nursing homes and doctors' offices. Before visiting a nursing home or hospital, a negative test must be presented and employees at such facilities must be tested several times a week.
If the infection situation worsens, states have the power to impose further measures, such as requiring masks to be worn in indoor areas such as shops and restaurants. Tests can also be made compulsory at schools and day-care centers.
At schools, states can also reintroduce mandatory mask-wearing but only for children aged over 11.
Criticism from patients' advocates
The Deutsche Stiftung Patientenschutz, an organization that represents the interests of severely ill and dying people and those in need of permanent care, has criticized the new rules, saying they either go too far or not far enough.
Its director told the German news agency epd that there were no humane and efficient protective strategies in place for elderly care.
He said there was a need for "task forces that could give immediate support in cases of outbreaks" and called for facilities allowing the separation of infected and non-infected residents of care homes.
He, however, called it excessive that care home residents were now expected to wear FFP2 masks when outside their rooms.
That measure was also condemned by the German National Association of Senior Citizens' Organisations (BAGSO), which pointed out that no other sector of the population was expected to wear a mask at home despite having had four vaccinations.
It said the new rules ignored the needs of care home residents for social and physical contact.
Oktoberfest is a superspreader event
tj/sms (AP, dpa, epd)
While you're here: Every Tuesday, DW editors round up what is happening in German politics and society. You can sign up here for the weekly email newsletter Berlin Briefing.