But be warned: Not all air or face masks are created equal when it comes to protecting against wildfire-related air pollution and smoke.

The smoky air in Northern California has created a rather dystopian-looking trend: air mask selfies. View this photo on Instagram instagram.com

The air quality in Northern California was among the worst in the world last week thanks to the deadly wildfires burning in the region. The haze isn't just changing how places like San Francisco and Sacramento look, it's also a threat to millions of people breathing in all that smoke and ash. Wildfire smoke carries particulate matter from everything the fire has consumed, from trees and brush to more alarming materials like metals and lead found in homes. It can make it harder to breathe for people who are in good health. For those with asthma or other conditions compromising their heart and lung functions, it can be dangerous.

That means people are flocking to stores to get air masks to try to protect their health. View this photo on Instagram Instagram: @fogorshinetravel

It's recommended that Californians in affected areas stay inside if they can. View this photo on Instagram instagram.com

But if you have to go out, the right kind of air mask can help. View this photo on Instagram Instagram: @cmacphoto

The soot in wildfire smoke — in addition to making it harder to breathe — can aggravate heart and lung conditions. Smoke can be especially threatening to teens and children because their lungs are still developing, they are more likely than adults to have asthma or spend time outside, and they tend to breathe more air per pound of body weight, according to the Environmental Protection Agency. The elderly are also at greater risk because they are more likely have heart or lung disease. The right kind of face mask can help protect against that particulate matter found in smoke.

But you should also know that not all masks are created equal. View this photo on Instagram Instagram: @manonofthemountains

Scarves, bandanas, and flimsy paper masks, like the kind a dentist might wear, won't cut it when it comes to filtering out air pollution containing the particulate matter that is most hazardous to the lungs. While some paper masks can help filter out larger particles and respiratory secretions, they aren't adequate for stopping tiny smoke particles.

In areas inundated with smoke, you should look for masks that are able to filter out PM2.5 — soot particles that measure less than 2.5 micrometers across, which can be inhaled deep into the lungs. That means you should look for a mask labeled as a “particulate respirator,” which says “NIOSH” and has either "N95" or "P100" on it, according to the EPA. Those labels mean they can filter out those tiny particles in the soot that can hurt your lungs and heart. Keep in mind the masks need to be worn snugly and correctly, and may not fit children or people with facial hair, according to the Food and Drug Administration. (Here's how to use a face mask correctly to protect against wildfire smoke.)

Make sure to follow the instructions and switch to a new mask if it becomes damaged, soiled, or hard to breathe through, according to the FDA. View this photo on Instagram Instagram: @annedyari

But it may not be enough to clear the skies. So keep those masks handy.