The immune system helps protect the body against contractable illnesses, such as a cold and the flu. Nutrition is an important part of ensuring that the immune system stays strong.

Regularly consuming some unhealthy foods may prevent the immune system from functioning properly. This may reduce its ability to function as well as it could.

Some research suggests that diets high in added sugar and excess salt are associated with an increased risk of certain autoimmune conditions and other chronic illnesses.

On the other hand, eating foods that contain certain nutrients, such as vitamin C, may help boost the immune system.

Not all inflammatory or immune conditions, including obesity and type 2 diabetes, are caused by the diet. Environmental disturbances, medications, and genetic predispositions also play a role.

Was this helpful?

This article will explore specific foods that may weaken the immune system and others that may help boost it.

A person shucking peasShare on Pinterest
Luana Failla/Offset

Anyone looking to support their immune function may want to limit or avoid the following types of foods.

Processed foods

Many processed foods contain unhealthy fats, sugars, and additives. These can improve a product’s taste, texture, and shelf life, but as the studies below suggest, they may weaken the immune system.

Some processed foods with high amounts of additives include:

  • canned foods
  • microwaveable meals
  • chips
  • cakes and cookies

One 2017 study found that eating foods containing additives may increase the risk of several chronic inflammatory or metabolic conditions. The study looked at additives such as sucralose, aspartame, carboxymethylcellulose, polysorbate-80, sodium, and carrageenan.

The researchers also observed that people with diets high in additives are more likely to have obesity, immune-related inflammation, and insulin resistance.

Meanwhile, a 2014 review of studies noted that a high intake of salt, refined sugar, saturated fat, and omega-6 fatty acids, along with a shortage of omega-3 fatty acids, can damage the immune system.

Eating sugars and fats in processed foods might also lead to an overconsumption of calories, which can increase the risk of obesity. Obesity can lead to inflammation, which can lead to insulin resistance, as well as immune system dysregulation.

Foods high in sugar

People with high sugar diets have an increased risk of several chronic conditions, including coronary heart disease and type 2 diabetes.

Some foods that tend to be high in sugar include:

  • preserves, marmalades, and sweets
  • cookies and cakes
  • flavored milk and sweetened dairy products
  • sugary breakfast cereals
  • sugary drinks, such as soda

Also, eating a diet high in sugar may limit the immune system’s ability to combat disease. It may do this by reducing the effectiveness of white blood cells and increasing inflammation.

Foods high in refined carbohydrates

Foods that are processed and high in refined carbohydrates, such as white flour and refined sugar, are associated with increases in inflammation and oxidative stress, which can harm the immune system.

Some foods that contain refined carbohydrates include:

  • white rice
  • white bread
  • sweets, cookies, and cakes made with white flour

Having a well-rounded, nutrient-dense diet can help with maintaining a moderate body weight, which is important for immune system function.

The following foods may provide more specific immune-boosting benefits.

Citrus fruits

These are good sources of vitamin C, and a 2017 study found that vitamin C has several properties that can contribute to healthy immune function.

Vitamin C is a powerful antioxidant. Antioxidants protect important molecules in the body, such as proteins and carbohydrates, from environmental and biological damage.

Vitamin C also helps promote metabolic energy and hormone regulation, and it is necessary for collagen production.

The same 2017 study reported that most people should aim to consume 100–200 milligrams (mg) of vitamin C per day.

Foods that contain zinc

Zinc is an essential mineral that is key for maintaining a healthy immune system.

The recommended daily intake of zinc ranges from 2–11 mg, depending on a person’s age and sex. When a person is pregnant, they need 11–13 mg.

Some dietary sources of zinc include:

  • oysters
  • beef
  • baked beans
  • fortified cereals
  • chicken breast
  • cheese
  • peas

Cruciferous vegetables

These vegetables, especially broccoli and broccoli sprouts, are good sources of the compound sulforaphane, which may help boost the immune system.

One 2016 study observed that sulforaphane has antioxidant, anti-inflammatory, and anticancer properties.

A 2018 study investigated the effect of sulforaphane on colon cancer cells. It found that sulforaphane prevented inflammation of the immune cells, which the researchers suggested may help prevent the development of cancer.


People have been using ginger to add flavor for centuries. More recently, researchers have investigated its effects on the immune system.

A 2020 analysis of high-quality studies found that consuming ginger supplements combatted inflammation associated with osteoarthritis and rheumatoid arthritis.

The analysis also found that ginger supplements helped reduce body weight in people with obesity. This may mean that ginger also improves the health of the immune system indirectly, as obesity is linked with chronic inflammation.

Anyone looking to support their immune system might want to limit their intake of foods high in refined carbohydrates, sugar, and additives. These foods may suppress immune function.

A varied diet that is rich in nutrients, on the other hand, may boost the immune system and help reduce inflammation.