Dark chocolate has a complicated relationship with migraines. For decades it’s been listed as a common trigger, but recent evidence suggests it may actually help prevent attacks. A large clinical trial of over 21,000 adults found that people taking a daily cocoa extract supplement were 15% less likely to report migraines than those taking a placebo. At the same time, about 16% of migraine sufferers say they avoid chocolate because they believe it triggers their attacks. The truth depends on timing, amount, and your individual biology.
Why Chocolate Gets Blamed for Migraines
Chocolate contains several compounds that have historically been linked to headaches. Phenylethylamine, a naturally occurring amine, and caffeine and theobromine, both stimulants, can alter blood flow in the brain and trigger the release of stress hormones from nerve cells. These effects led researchers to classify chocolate as a dietary trigger alongside red wine and aged cheese.
But the clinical evidence for chocolate actually causing migraines is surprisingly weak. Experimental studies that give migraine sufferers chocolate under controlled conditions have consistently failed to reproduce attacks at meaningful rates. Reviews of the research show that while 12 to 60% of migraine patients point to food as a trigger, the actual proof that those foods reliably cause attacks is thin.
The Craving That Comes Before the Pain
One of the most important shifts in migraine science is the recognition that what looks like a trigger may actually be an early symptom. Migraines have a “premonitory phase” that begins hours or even days before the headache itself. During this phase, the brain is already in the early stages of an attack, producing symptoms like food cravings, mood changes, and heightened sensitivity to light and sound.
Here’s how the misunderstanding works: you crave chocolate, you eat some, and hours later a migraine hits. You naturally blame the chocolate. But the craving was itself a signal that the migraine had already started inside your brain. A 2021 study in the Journal of Neurology found a strong statistical link between food cravings in the premonitory phase and patients later identifying food as a trigger. The researchers concluded that many perceived triggers are “correctly associated with the trigger factors yet falsely attributed to them.” This also explains why avoiding chocolate rarely reduces migraine frequency for most people.
Magnesium and Migraine Prevention
Dark chocolate is one of the richest food sources of magnesium, a mineral with well-established ties to migraine prevention. One ounce of 70-85% dark chocolate provides about 64 mg of magnesium. That’s a meaningful contribution, though still a fraction of the roughly 400 mg most adults need daily. Even chocolate in the 60-69% cocoa range delivers about 50 mg per ounce.
Magnesium matters for migraines because it helps regulate nerve signaling and blood vessel tone, both of which go haywire during an attack. Migraine sufferers frequently have lower magnesium levels than people without migraines, and supplementation has been shown to reduce both the frequency and severity of attacks. Eating dark chocolate won’t replace a supplement if you’re deficient, but as part of an overall diet, it contributes to the mineral intake that keeps your nervous system stable.
Cocoa Flavanols and Blood Flow
The compounds in cocoa that give dark chocolate its bitter taste, called flavanols, have powerful effects on blood vessels. They help the body produce and maintain healthy levels of nitric oxide, a molecule that keeps blood vessels relaxed and flexible. Flavanols do this in two ways: they boost the enzymes that make nitric oxide, and they neutralize the molecules that destroy it.
This matters for migraines because vascular dysfunction plays a role in many attacks. Research published in the Journal of Clinical Biochemistry and Nutrition shows that cocoa flavanols improve the ability of blood vessels to dilate on demand, lower blood pressure, and reduce oxidative stress in vessel walls. Over time, these effects create a more stable vascular environment, which may make the brain less susceptible to the blood flow disruptions that characterize migraine attacks.
The strongest clinical evidence comes from the COSMOS trial, a large randomized, placebo-controlled study funded by the NIH. Participants who took a daily cocoa extract supplement containing 500 mg of flavanols were significantly less likely to develop migraines (a 15% reduction in risk) compared to those on placebo. The supplement also contained small amounts of caffeine (15 mg) and theobromine (50 mg), both naturally present in cocoa.
The Serotonin Connection
Dark chocolate contains tryptophan, the amino acid your body uses to make serotonin. Serotonin plays a central role in migraine biology: levels drop between attacks and spike during them. This fluctuation is part of what drives both the pain and the sensory disturbances of a migraine.
Between attacks, migraine sufferers tend to have lower baseline levels of both serotonin and tryptophan. Research in Neurology International suggests that tryptophan-rich diets can reduce the odds of migraine attacks, likely by helping stabilize serotonin levels so the dramatic swings are less severe. Dark chocolate is one of many tryptophan-containing foods (alongside turkey, eggs, nuts, and lentils) that may support this effect when eaten regularly as part of a balanced diet. There is a theoretical concern that consuming tryptophan during an attack could worsen it by further elevating serotonin, but for prevention purposes, steady dietary intake appears beneficial.
Caffeine: A Double-Edged Factor
Dark chocolate contains caffeine, but far less than most people assume. Two squares (about 14 grams) of dark chocolate have roughly 7 mg of caffeine. A standard cup of brewed coffee has 90 mg. You’d need to eat an entire bar to approach the caffeine in one cup of coffee.
This low dose is actually relevant to the migraine question. Small amounts of caffeine can help relieve headaches by constricting dilated blood vessels, which is why caffeine appears in many over-the-counter headache medications. But high or erratic caffeine intake is a well-known migraine trigger. The modest caffeine in a serving or two of dark chocolate falls well within the range that’s more likely to help than hurt, especially if your overall caffeine intake is consistent from day to day.
How to Use Dark Chocolate Wisely
If you’ve been avoiding dark chocolate because of migraines, the evidence suggests reconsidering. Choose chocolate with at least 70% cocoa content to maximize flavanols and magnesium while minimizing added sugar. A one-ounce serving (roughly a single row of squares from a standard bar) is a reasonable daily amount that provides beneficial compounds without excessive calories or caffeine.
Pay attention to your own patterns, but be aware of the craving-versus-trigger distinction. If you notice you want chocolate before a migraine, that craving is likely part of the attack itself rather than a warning to avoid eating it. Keeping a detailed migraine diary that tracks cravings, food intake, and headache onset with precise timestamps can help you tell the difference.
The strongest benefits come from consistent, moderate intake rather than occasional large amounts. The COSMOS trial participants took cocoa flavanols daily for years, and the protective effect appeared as a gradual reduction in migraine risk over time. A square or two of high-quality dark chocolate each day, combined with other magnesium and tryptophan-rich foods, is a reasonable approach supported by the current evidence.