How important is diet for a healthy immune system?

In winter, when viruses such as flu are more likely to circulate, there are often claims made that you can boost your immunity by eating particular foods.
A healthy, balanced diet is important for supporting your immune system. You need sufficient energy and nutrients for the immune system to function properly, and poor nutrition can compromise it. But there is “no individual nutrient, food or supplement that will boost immunity, or stop us getting highly infectious viruses”, says Sara Stanner, Science Director at the British Nutrition Foundation.
So do you need to make changes to your diet for the sake of your immune health?
The importance of five a day
Aim to eat a wide range of fruit and veg to ensure you get all the nutrients your immune system needs. “Each micronutrient plays a different role in the immune system – don’t make a hero of just one”, says Stanner.
Fruit and veg are packed with vitamins, minerals and chemical compounds known as phytochemicals, which Dr Rupy Aujla says can be converted by your gut microbes into beneficial metabolites that fight inflammation in the body.
The colour of a plant is determined by the phytochemicals it contains, and some of these are associated with “positive benefits for the immune system”, says dietitian Sophie Medlin. The wider the variety of different coloured plants you eat, the more types of phytochemicals you’ll consume.
Red, orange, yellow and green plants contain carotenoids, which have been associated with boosting immunity. Evidence for the benefits of phytochemicals to immunity is not conclusive, but there is no health downside to eating five a day.
Put some frozen or tinned fruit and veg into your trolley for when you run out of fresh – frozen can be more nutritious because it’s frozen so soon after picking. Tinned fruit and veg, including beans and lentils, count towards your five a day, but be careful to choose tinned fruit with no added sugar.
Related stories
Saucy lentil gnocchi ragù | Save to Your Favourites now
This delicious winter-warming recipe is packed with veg and other plants

Support your gut
Professor Tim Spector, Professor of Genetic Epidemiology, Kings College London, says research suggests there's a connection between the bacteria in your gut and the functioning of your immune system.
He explains that the wider the variety of plant fibre you eat, the healthier and “more diverse” the bacteria in your gut will be. The optimum level of variety is eating “30 different types of fruit and vegetables per week”, including nuts, seeds and herbs. But there are additional ways to support your gut bacteria via diet.
Vegetables are a type of prebiotic, a group of fibre-containing foods that ‘fertilise’ existing bacteria and encourage microbe development. Other prebiotics include wholegrain foods, such as brown bread, rice and pasta, beans and pulses.
The average UK fibre consumption is below the recommended daily intake in every age group, according to the National Diet and Nutrition Survey, so this is really worth thinking about.
Eating probiotics, such as live yoghurt, quality cheese (not the ultra-processed stuff) and fermented foods, encourage more microbes to grow. But there's limited research as to whether they actually reach the gut.
Spector’s advice is to limit ultra-processed foods as they have been found to “reduce the diversity of bacteria” in your gut.
Cold kimchi noodles | Save to Your Favourites now
Kimchi is a formented food that's reported to be good for our gut health

Food vs supplements
Medlin argues you can absorb more nutrients through whole foods than through supplements, and adds that phytochemicals cannot be replicated by supplements. However, she advises a multivitamin can be helpful if you are not getting all your nutrients from your diet or are unwell.Vitamin C supplements are popular, and this vitamin is very important for the immune system, but in reality few people in the UK are deficient in it.
Irresistible: Why We Can’t Stop Eating | Save to your iPlayer watchlist now
Dr Chris Van Tulleken investigates our reliance on ultra processed foods

Nutrients for immunity
Stanner highlights the following nutrients as important for normal immune function:
- Vitamin A supports T Cells (a type of white blood cells that identifies pathogens). Your body converts beta carotenes, from foods such as yellow, red and green (leafy) veg, carrots, sweet potatoes, red peppers and yellow fruits, into vitamin A. Liver, whole milk and cheese contains retinol, a preformed version of vitamin A.
- Vitamin B6, B12, folate, selenium and zinc help produce immune cells. Poultry, fish, egg and bananas contain B6. Meat, salmon, cod, milk, cheese, eggs and fortified foods contain B12. Green vegetables, pulses, nuts and seeds are good sources of folate. Brazil nuts, fish, meat and eggs contain selenium, while zinc can be found in meat, shellfish, dairy, bread and cereal products such as wheatgerm.
- Copper helps protect and fuel immune cells. Nuts, shellfish and offal are good sources.
- Iron helps immune cells stay healthy. Research shows females aged 15-49 are the most likely group to have anemia. Iron can be found in red meat and fish. Plant-based sources of iron (called non-heme iron), including wholegrains, nuts, beans and dried fruits, but aren’t as easily absorbed.
- Low levels of vitamin D are associated with reduced immune response. Our skin makes vitamin D from the sun, which is why the NHS say 'everyone should consider taking a daily vitamin D supplement during the autumn and winter.'
If you think you might be consuming too little (or too much) of a particular nutrient, type it into our nutrition calculator below to find out how likely that is, based on your age and sex.
Click or tap the picture below to use the calculator.
BBC Food nutrition calculator
Find out exactly how much of a particular nutrient you need using our handy calculator

Originally published June 2020. Updated November 2025
Want more? Visit BBC Food on Instagram, Facebook and Pinterest or watch the latest Food TV programmes on BBC iPlayer.


