Food fuels your immune system by helping it build new immune cells, protective antibodies, proteins, and enzymes that, together, keep illness-causing invaders out. In fact, research suggests that providing your body with the right key nutrients through a balanced diet is one of the best ways to prevent colds, stomach bugs, and the like.

That’s partly because the digestive tract that your food passes through houses 70% of the immune system and a large part of the gut microbiome, explains Mary Weiler, Ph.D., R.D., a nutrition scientist with Abbott. The microorganisms that make up your gut microbiome require a healthy balance of food-sourced bacteria to function and, subsequently, to support optimal immune health.

“Remember the saying, ‘You are what you eat?’ It might sound silly, but as it relates to your immune system, it’s true,” Weiler says.

And what are the best foods to help fight viruses and protect yourself from illness, you ask? Below, we’ve rounded up everything to know about what to eat to boost your immunity—but first, some background on why that’s worth caring about.

Think of your immune system as your body’s gatekeeper. It serves as protection against any foreign substances (such as bacteria, viruses, parasites, or fungi) that may enter your body and cause harm.

Here’s how it works: Your immune system is a vast network of organs, proteins, and cells—like your skin, bone marrow, blood, and mucosal tissue—that join forces to distinguish healthy cells from not-so-healthy ones. How? When a germ makes its way into your body, your immune system receives signals that something isn’t quite right. From there, it responds by sending your body’s frontline defense force of white blood cells (or immune cells) to attack and destroy anything that it interprets as risky or dangerous, according to the NIH.

You don’t realize how hard your immune system is working until you come down with something that your body may have never dealt with before. People with compromised immune systems—say, those who have autoimmune diseases like lupus or serious infections like HIV, people going through chemotherapy, or even pregnant women—are at a much higher risk of dealing with infection-inducing germs that wouldn’t be a problem if they were otherwise healthy. So it’s even more important for those populations to support their immune systems with a balanced diet.

Here are 30 immune-boosting foods to consider adding to your meals, whether you’re battling a health issue or currently feeling fit as a fiddle. According to our experts, they’re particularly rich in the type of nutrients that assist your body’s ability to stave off harmful pathogens.

Yogurt

food, strawberry, strawberries, dish, cuisine, ingredient, fruit, produce, dessert, tableware,
Getty Images

“Think of probiotics as the ‘good bacteria’ in the gut, helping influence the microorganisms that live in the digestive tract,” explains Weiler. While you can buy probiotic supplements, a 2017 study published in Nutrients found that daily consumption of probiotic-rich yogurt can improve immune function by increasing the activity of natural killer cells, or cells that limit the spread of disease. Be sure to pick up containers free of excess added sugar—plain varieties (which you can flavor with cinnamon and fresh fruit) are your best bet, but anything with less than 8 total grams of sugar is a wholesome option.


Oats and barley

bowl of muesli with greek yogurt, popped quinoa, raspberries, blueberries and pomegranate seed
Westend61//Getty Images

These grains contain beta-glucan, a type of fiber that helps fight disease by stimulating immune cells, research shows. Fiber in general also provides nourishment for healthy gut bacteria to thrive and thus support the immune system, Weiler explains.


Garlic

food, garlic, ingredient, vegetable, dish, produce, cuisine, pearl onion, elephant garlic, plant,
Getty Images

This potent onion relative contains the active ingredient allicin, which fights infection and bacteria. In one study, British researchers gave 146 people either a placebo or a garlic extract for 12 weeks; the garlic takers were two-thirds less likely to catch a cold. Another 2020 meta-analysis found that garlic consumption may lower the risk of colorectal cancer.


Shellfish

clams
Getty Images

Selenium—plentiful in shellfish such as oysters, lobsters, crabs, and clams—helps white blood cells produce cytokines, proteins that help clear flu viruses out of the body.


Chicken soup

dish, food, cuisine, soup, ingredient, noodle soup, cabbage soup diet, chicken soup, asian soups, caldo de pollo,
Getty Images

When University of Nebraska researchers tested 13 chicken soup brands, they found that all but one (chicken-flavored ramen noodles) blocked the migration of inflammatory cells—an important finding, because cold symptoms are a response to the cells’ accumulation in the bronchial tubes. The amino acid cysteine released from chicken during cooking chemically resembles the bronchitis drug acetylcysteine, which may explain the results. The soup’s salty broth also keeps mucus thin the same way cough medicines do. Added spices, such as garlic and onions, can increase soup’s immune-boosting power.


Turmeric

turmeric
krisanapong detraphiphat//Getty Images

“Turmeric contains curcumin, a compound with anti-inflammatory properties that can help support a healthy immune system,” says Brea Lofton, M.S., R.D.N., Lumen nutritionist. Lofton adds that one peer-reviewed study investigated how curcumin may be useful in preventing and treating chronic diseases associated with inflammation, and found that it has potential as a therapeutic agent for conditions such as arthritis, cancer, and cardiovascular disease, in part due to its immune-modulating properties.


Tea

tea cup steaming
Stefania Pelfini, La Waziya Photography//Getty Images

Black tea contains L-theanine, an immune-boosting amino acid. Both black and green tea also contain catechins, antioxidants that have been found to possibly prevent the flu.


Beef

beef kabobs
Getty Images

Zinc is essential for the development of white blood cells, the intrepid immune system cells that recognize and destroy invading bacteria, viruses, and assorted other bad guys, says William Boisvert, Ph.D., an expert in nutrition and immunity at The Scripps Research Institute in La Jolla, CA. Beef is a good source of zinc, as are milk and beans.


Pork

fresh pieces pork ready to cook on a dark background
Rares Caragiale / 500px//Getty Images

It’s important to get the recommended 8 to 11 mg of zinc per day to keep the immune system functioning properly, says Weiler. She recommends adding pork as another zinc source in a balanced diet, be it a grilled pork chop or tenderloin.


Almonds

almond nuts in white bowl isolated on beige background minimal flat lay style top view, copy space
Tanja Ivanova//Getty Images

Almonds are high in vitamin E, containing around 7 mg per serving, explains Lofton. Vitamin E is an antioxidant that can help protect cells from damage and therefore, potentially prevent illness.


Sweet potatoes

dish, food, cuisine, potato wedges, ingredient, root vegetable, vegan nutrition, vegetable, produce, vegetarian food,
Getty Images

You may not think of skin as part of your immune system. But this crucial organ serves as a first-line fortress against bacteria, viruses, and other undesirables. To stay strong and healthy, your skin needs vitamin A. “Vitamin A plays a major role in the production of connective tissue, a key component of skin,” explains David Katz, M.D., director of the Yale-Griffin Prevention Research Center in Derby, CT. One of the best ways to get vitamin A into your diet is from foods containing beta-carotene (which gives them a vibrant orange pigment), like sweet potatoes, carrots, squash, canned pumpkin, and cantaloupe.


Ginger

ginger and ginger powder, ginger tea
manusapon kasosod//Getty Images

“Ginger can help boost immune function by reducing inflammation in the body,” says Lofton.


Kale

kale
jenifoto/Getty Images

Along with orange produce, dark, leafy greens like kale contain vitamin A and can help bolster immune function.


Bell peppers

bell peppers vitamin c immune system
Amit Basu Photography//Getty Images

There’s a reason you’re told to load up on vitamin C when you get sick: The nutrient is great for your skin, which acts as a barrier between your body and harmful organisms. On top of that, studies show that not getting enough vitamin C can actually impair your immune response and make you more susceptible to infections. While the jury is still out on whether or not vitamin C can truly prevent a cold, a 2017 review of research suggests supplementing with C can help stave off respiratory infections—or at the very least, help reduce the severity and length of your symptoms if you fall ill.


Broccoli

broccoli
greenlin//Getty Images

Lofton says broccoli is rich in vitamins A and C, as well as fiber, which work together to support a healthy gut microbiome and immune system.


Eggs

eggs vitamin d immune system
istetiana//Getty Images

You already know that vitamin D is important for your bones, since it helps you absorb calcium properly—but it’s also essential for a healthy immune system. In fact, vitamin D deficiency (which affects an estimated 1 billion people worldwide) may increase your chances of upper respiratory infections and even immune disorders such as multiple sclerosis, type 1 diabetes and Crohn’s disease, research shows. Why? Scientists have found that your immune cells actually have vitamin D receptors, which are important for regulating your body’s natural defense mechanisms.

While the sunshine vitamin is hard to come by naturally through your diet, foods high in vitamin D, such as eggs, can help you meet your daily intake. The National Institutes of Health (NIH) recommends a minimum of 600 international units (IUs) of vitamin D for most adults daily, but other accredited organizations suggest aiming much higher.


Fortified cereals

fortified cereal
mikroman6/Getty Images

Not a fan of eggs? Certain cereals are fortified with vitamin D, which “helps to activate immune cells and properly regulate their function, and is critical for innate and adaptive immunity,” says Weiler. One serving of Total Whole Grain Breakfast Cereal with a half-cup of skim milk provides 40% the daily recommended value of vitamin D, for example—so check that nutritional info when you’re shopping the cereal aisle.


Mushrooms

mushrooms
Getty Images

People around the world have turned to mushrooms for a healthy immune system for centuries, and contemporary researchers now know why. “Studies show that mushrooms increase the production and activity of white blood cells, making them more aggressive. This is a good thing when you have an infection,” says Douglas Schar, Dip.Phyt., M.C.P.P., M.N.I.M.H., the former director of the Institute of Herbal Medicine in Washington, DC. They’re also another great source of vitamin D.


Bone broth

bone broth in a glass jar on rustic table
fcafotodigital//Getty Images

“Bone broth is made by simmering bones and connective tissue from animals, which releases nutrients such as collagen, amino acids, and minerals,” explains Lofton. “These nutrients can help support immune function and overall health.”


Kefir

kefir on table
istockphotoluis/Getty Images

Like yogurt, kefir, a fermented yogurt drink, contains gut- and immune-boosting probiotics.


Fatty fish

salmon with lemon
kajakiki/Getty Images

Salmon, mackerel, and herring are rich in omega-3 fatty acids, which reduce inflammation, increasing airflow and protecting lungs from colds and respiratory infections (salmon is another vitamin D source, too). One animal study also found that the nutrient may help ward off various strains of the flu.


Citrus

citrus fruits slices on a white background
A. Martin UW Photography//Getty Images

As we all probably know, citrus fruits like oranges and grapefruit are high in vitamin C, a nutrient that is, like the orange juice commercials say, essential for immune function. “Vitamin C builds healthy skin and tissue to resist entry of bacteria and other germs,” says Weiler. “The vitamin also contributes to the rapid increase in B cells and T cells, two white blood cells that play a role in secreting antibodies and killing off infections.”


    Sunflower seeds

    sunflower seeds
    Fernando Trabanco Fotografía//Getty Images

    More than just a salty summer snack meant for baseball games, Lofton points out that sunflower seeds are high in vitamin E, an antioxidant that can help protect cells from damage.


    Blackberries

    italy, primiero, tonadico, blackberries
    Aldo Pavan//Getty Images

    Blackberries are high in antioxidants, plant compounds that can help shield the body from environmental stressors and germs, says Lofton. They also contain fiber and vitamin C, which support a healthy immune system and gut.


    Chicken breast

    grilled chicken breast in different variations with cherry tomatoes, green french beans, garlic, herbs, cut lemon on a teflon pan
    Kseniya Ovchinnikova//Getty Images

    “Protein is an important building block for antibodies and immune cells and supports wound healing,” says Weiler. “Generally, try to aim for 25 to 30 grams (g) of protein at every meal to get what you need over the day.” To do so, she recommends chicken breast as a premium source.


    Legumes

    bowls of lentils and beans
    Michelle Garrett//Getty Images

    If you eat a plant-based diet and are looking to up your protein intake for immunity function, Weiler recommends having a legume salad or a side of baked beans. According to the United States Department of Agriculture (USDA), a cup of cooked lentils boasts 18 g of protein.


    Celery

    celery
    SCIENCE PHOTO LIBRARY//Getty Images

    Celery is high in fiber, “which provides nourishment for beneficial bacteria in the gut to support the immune system,” says Weiler. The satisfyingly crunchy snack also has a high water content, which can boost hydration for immune and digestive systems in need. “Hydration is critical to maintaining mucus membranes, which aid in the trapping of bacteria and viruses and assists with their release via coughing and sneezing,” Weiler explains.


      Kiwi

      sliced kiwi
      Photo by Cathy Scola//Getty Images

      Kiwi contains vitamin E and water, which translates to protection and hydration essential to all bodily systems. “Vitamin E has been shown to increase the percentage of T cells, the white blood cells that seek out and destroy harmful invaders,” adds Weiler.


      Blueberries

      bowl of blueberries on wood
      Westend61//Getty Images

      Blueberries are abundant in polyphenols, an antioxidant that protects against inflammation. That’s why the superfood has been studied for its many health benefits, including those for heart and immune health.


      Brazil nuts

      raw braziil nuts
      4kodiak//Getty Images

      Brazil nuts are high in selenium, explains Weiler. Selenium, via selenoproteins and enzymes, has antioxidant properties that help to break down peroxides that can damage tissues and DNA, per Harvard T.H. Chan School of Public Health.

      Additional reporting by Alisa Hrustic.

      Headshot of Kayla Blanton
      Kayla Blanton

      Kayla Blanton is a freelance writer-editor who covers health, nutrition, and lifestyle topics for various publications including Prevention, Everyday Health, SELF, People, and more. She’s always open to conversations about fueling up with flavorful dishes, busting beauty standards, and finding new, gentle ways to care for our bodies. She earned a bachelor’s degree in journalism from Ohio University with specializations in women, gender, and sexuality studies and public health, and is a born-and-raised midwesterner living in Cincinnati, Ohio with her husband and two spoiled kitties.