What Causes Canker Sores: Foods, Stress, and More

Canker sores are caused by an overactive immune response that destroys small patches of the mouth’s lining, but the specific trigger varies from person to person. About 20% of the general population gets them, and the list of contributing factors ranges from physical injury and stress to nutritional deficiencies and genetics. Unlike cold sores, canker sores are not caused by a virus and are not contagious.

How Canker Sores Actually Form

A canker sore isn’t just surface irritation. It’s an immune system attack on your own oral tissue. Certain white blood cells, specifically T cells, target and destroy the thin layer of cells lining the inside of your mouth. Once the attack begins, your body releases inflammatory signaling molecules that sustain the damage and keep the area inflamed, which is why canker sores can take a week or more to heal even after the original trigger is gone.

One theory is that T cells react to a common mouth bacterium and, in the process, mistakenly damage healthy oral tissue. This cross-reaction helps explain why canker sores tend to appear in people whose immune systems are already primed for overreaction, whether from stress, illness, or genetic predisposition.

The Most Common Everyday Triggers

Physical injury to the mouth is one of the most reliable triggers. Biting your cheek, brushing too aggressively, getting poked by a sharp chip, or irritation from braces or dental work can all set one off. The damaged spot gives the immune system a target, and in susceptible people, the healing process overshoots into a full ulcer.

Stress is another well-established trigger. The classic example: college students developing canker sores during finals week. Stress hormones alter immune function in ways that make the mouth’s lining more vulnerable to inflammatory attacks.

Certain toothpaste ingredients, particularly sodium lauryl sulfate (a foaming agent), can irritate oral tissue and increase canker sore frequency. Switching to an SLS-free toothpaste is one of the simplest changes people with recurring sores can make.

Foods That Set Them Off

Food triggers work through different mechanisms depending on the food. Acidic items like citrus fruits, tomatoes, and coffee directly irritate the mouth’s lining. Coffee is high in salicylic acid, which can aggravate your gums, cheeks, and tongue. Spicy foods work similarly, combining acidity with chemical compounds that inflame already-sensitive tissue.

Chocolate, peanuts, and eggs appear to trigger canker sores through a different pathway. Chocolate contains an alkaloid called theobromine that can provoke a sensitivity reaction in the mouth, similar to a mild allergic response. For people with this sensitivity, eating chocolate leads to ulcers on the tongue and inner cheeks. This is closer to a delayed hypersensitivity reaction than simple chemical irritation.

Alcohol is worth noting too. It’s acidic, it irritates soft tissue directly, and it can damage the mouth’s protective mucous layer, making bacterial infection and inflammation more likely.

Nutritional Deficiencies Play a Larger Role Than Most People Realize

If you get canker sores frequently, a nutritional gap may be involved. A study comparing people with recurrent canker sores to healthy controls found striking differences. Among those with recurring ulcers, about 50% were deficient in vitamin B12, compared to none in the healthy control group. Low folate levels appeared in roughly 46% of canker sore patients, and about 10% had low iron stores.

B12 deficiency stands out as particularly significant because of how stark the difference was between the two groups. B12 is essential for maintaining healthy mucous membranes, and when levels drop, the mouth’s lining becomes thinner and more susceptible to immune-mediated damage. People who eat little meat, dairy, or fortified foods are at higher risk, as are older adults whose B12 absorption naturally declines.

Iron and folate deficiencies can have similar effects on oral tissue health, though the research on those nutrients is less clear-cut. If your canker sores keep coming back without an obvious trigger like stress or injury, a blood test checking these three nutrients is a reasonable step.

Genetics and Family History

Canker sores run strongly in families. If both of your parents get them, your chance of developing them is around 90%. If neither parent has a history of canker sores, that drops to about 20%. This genetic component likely involves inherited differences in immune regulation, specifically how aggressively your T cells respond to minor oral irritation.

This hereditary pattern also explains why some people can eat all the chocolate and citrus they want without a single sore, while others develop ulcers from the slightest trigger. The underlying immune tendency is largely set by your genes; environmental factors determine when and how often that tendency manifests.

Hormonal Shifts in Women

Many women notice canker sores appearing right before or during their period. This timing corresponds with a drop in estrogen levels. The sudden shift in estrogen may disrupt the stability of oral tissue, making it more vulnerable to the inflammatory process that creates ulcers. Some researchers have also found that rising salivary estrogen levels during certain phases of the cycle increase shedding of the oral lining, which could create entry points for immune attack.

Pregnancy and menopause, both periods of major hormonal change, can also alter canker sore patterns. Some women find their sores improve during pregnancy, while others experience more frequent outbreaks.

Underlying Medical Conditions

Recurring canker sores can be a symptom of a deeper health issue. Celiac disease is the most notable connection. About 5% of people with celiac disease have canker sores as their only symptom, with no digestive complaints at all. Among people with persistent, unexplained mouth ulcers, studies have found celiac disease rates as high as 31%.

Crohn’s disease and ulcerative colitis are also linked. Roughly 20 to 30% of people with Crohn’s disease experience recurrent canker sores, and the figure is around 10% for ulcerative colitis. In these conditions, the same overactive immune response that attacks the intestinal lining can target the mouth as well.

Other conditions associated with frequent canker sores include Behçet’s disease (a rare inflammatory disorder where mouth ulcers are a hallmark symptom), HIV infection (where sores can take months to heal), and various autoimmune conditions that broadly dysregulate immune function.

Types and Healing Timelines

Not all canker sores are the same. Minor aphthous ulcers, the type most people get, are less than 1 centimeter across and shallow. These typically heal within one to two weeks without scarring. They’re painful but manageable.

Major aphthous ulcers are larger and penetrate deeper into the tissue. They take longer to heal, often several weeks, and can leave scars. A third type, called herpetiform ulcers, appears as clusters of tiny sores that can merge into larger irregular shapes. Despite the name, these have nothing to do with the herpes virus.

If a canker sore lasts longer than three weeks, is unusually large, comes with a fever, or makes it difficult to drink fluids, something beyond a standard ulcer may be going on. Persistent or severe sores sometimes point to the underlying conditions described above, or occasionally to oral cancers that can mimic the appearance of a canker sore.