Cabbage, cow’s milk, onion, broccoli, cauliflower, and chocolate are the foods most consistently linked to gas and colic symptoms in breastfed infants. But the connection between what you eat and your baby’s gas is more nuanced than most lists suggest. Not every “gassy” food actually causes problems through breast milk, and the biggest culprit isn’t a vegetable at all.
How Your Diet Actually Affects Your Baby’s Gas
A common belief is that if a food gives you gas, it will give your baby gas too. That’s not quite how it works. The gas you feel from eating beans or broccoli is produced by bacteria in your own intestines breaking down fiber. That gas itself doesn’t enter your bloodstream or your breast milk.
What does transfer into breast milk are proteins, flavors, and certain other compounds from the foods you eat. When these reach your baby through milk, their immature digestive system may react with fussiness, gas, or colic-like symptoms. Newborns produce lower levels of the enzymes needed to break down fats and carbohydrates. Pancreatic enzymes for fat digestion often don’t reach adult levels until around six months of age, and enzymes for starch digestion take even longer. This immaturity is a major reason young babies are prone to gas in general, regardless of your diet.
Foods With the Strongest Evidence
A study published in the Journal of the American Dietetic Association tracked the diets of breastfeeding mothers against colic symptoms in their exclusively breastfed infants. The results pointed to a handful of specific foods. Cow’s milk had the strongest association, doubling the risk of colic symptoms. Onion increased the risk by 70%. Cabbage and broccoli each raised it by about 30%, and chocolate and cauliflower showed modest but statistically meaningful increases as well.
Mothers who ate more than one cruciferous vegetable (the family that includes broccoli, cabbage, cauliflower, and Brussels sprouts) had a 60% higher chance of their infant experiencing at least one colic symptom compared to mothers who avoided them. These aren’t dramatic increases on their own, but they can add up if you’re eating several of these foods regularly.
Cow’s Milk Deserves Special Attention
Dairy stands apart from the other trigger foods because it involves a different mechanism. About 0.5% of exclusively breastfed infants have a confirmed cow’s milk protein allergy. That number sounds small, but cow’s milk protein is the single most common food allergen in infants, and milder sensitivities that don’t meet the threshold for a formal allergy diagnosis are more widespread.
Gas and fussiness alone can have many causes. Signs that point more specifically toward a cow’s milk protein issue include bloody or mucus-streaked stools, persistent vomiting, skin rashes or eczema that flares after feedings, and in some cases diarrhea or poor weight gain. If your baby has gas plus any of these additional symptoms, a dairy elimination trial is a reasonable step to discuss with your pediatrician.
The Common Suspects List
Based on both clinical data and what breastfeeding mothers most frequently report, these are the foods most often linked to infant gas:
- Dairy products: milk, cheese, yogurt, ice cream, butter
- Cruciferous vegetables: broccoli, cabbage, cauliflower, Brussels sprouts, kale
- Onions and garlic
- Beans and lentils
- Chocolate
- Caffeine: coffee, tea, energy drinks
For caffeine specifically, the threshold is fairly generous. Less than 1% of the caffeine you consume transfers to breast milk, and up to about three cups of coffee per day produces no detectable caffeine in an infant’s urine. Problems start when intake exceeds roughly five cups in a day, at which point caffeine can accumulate in the baby’s system.
Spicy foods and acidic foods like citrus, tomatoes, and pineapple are frequently blamed but lack supporting evidence. Strong flavors like garlic can change the smell and taste of breast milk, but this doesn’t typically make infants fussier. Acidic foods don’t change the pH of your blood or your milk.
How to Test Whether a Food Is the Problem
Cutting out everything at once is tempting when your baby is miserable, but it makes it impossible to identify the actual trigger and can leave you nutritionally depleted. An elimination approach works better. Remove one suspect food (start with dairy, since the evidence is strongest) and wait two to four weeks. The food itself clears from your milk within a few days, but your baby’s gut may take longer to settle, so patience matters here.
If symptoms improve, try reintroducing the food after that window. A return of symptoms confirms the link. If nothing changes after a full two to four weeks, that food probably isn’t the issue, and you can add it back and try eliminating the next candidate. Give each food its own two-to-four-week trial before drawing conclusions.
The American Academy of Pediatrics notes that foods like cabbage, broccoli, and beans may cause temporary gassiness in some babies, but that this is usually short-lived and doesn’t necessarily mean you need to stop eating them permanently.
Other Causes of Infant Gas Worth Checking
Before overhauling your diet, it’s worth considering whether something other than food is driving the problem. One overlooked cause is lactose overload, which happens when a baby takes in a large volume of lower-fat milk, either because of oversupply or long gaps between feedings. The milk moves through the baby’s gut too quickly for all the lactose to be digested, producing significant gas, green or foamy stools, and noticeable pain. If your baby has yellow stools and seems generally comfortable between episodes, this likely isn’t the issue. But if stools are consistently green and explosive, adjusting feeding patterns (shorter gaps, finishing one breast before switching) can help more than any dietary change.
Swallowing air during feeding is another common contributor. A shallow latch, fast letdown, or crying before feeds can all cause a baby to gulp air, which has nothing to do with what you ate. Frequent burping during and after feeds, paced bottle-feeding if you’re supplementing, and keeping the baby slightly upright during feeds can reduce air intake considerably.
When Gas Is More Than Just Gas
Most infant gas peaks in the first few months and improves on its own as the digestive system matures. A specific probiotic strain, Lactobacillus reuteri DSM 17938, has shown consistent results in reducing crying time in colicky breastfed infants. In clinical trials, babies given this probiotic for 21 days cried significantly less than those given a placebo, with benefits appearing as early as seven days into treatment.
What separates normal newborn gassiness from something that needs medical evaluation is the presence of additional symptoms. Bloody stools, persistent vomiting, rashes, poor weight gain, or extreme lethargy alongside gas and crying suggest something beyond a simple dietary sensitivity. These patterns can indicate a true milk protein allergy or another condition that benefits from professional assessment rather than dietary trial and error alone.

