Diet doesn’t cause inflammatory bowel disease (IBD), but certain foods can trigger ulcerative colitis (UC) symptoms like diarrhea or belly pain. Most people with IBD — about two-thirds — have an intolerance or sensitivity to foods such as dairy, eggs, or artificial sweeteners.

A smaller percentage of people with UC have food allergies. Unlike a food intolerance, a food allergy happens when the immune system reacts to the proteins in certain foods. A true food allergy can cause severe symptoms like shortness of breath and swelling of the mouth and throat.

If you have food allergy symptoms, testing may help identify which foods bother you, so you can cut them out of your diet.

UC stems from a problem with the immune system. A faulty immune response is also behind food allergies.

In food allergies, the immune system overreacts to normally harmless foods like milk or eggs. If you’re exposed to one of these foods, your immune system releases a protein called immunoglobulin E (IgE).

When you’re exposed to your trigger food, IgE directs your body to release histamine. This chemical causes symptoms like wheezing and hives whenever you eat the offending food.

In UC, the immune system also overreacts. It attacks the lining of the colon. As in food allergies, some people with UC have higher levels of IgE and histamine in their bodies.

Normally, the gut acts like a barrier to prevent the immune system misfires that cause food allergies. But in UC, inflammation damages the intestine and reduces this protective effect.

If you have a food intolerance, you’ll get symptoms similar to those of UC whenever you eat that particular food. These can include:

  • gas
  • bloating
  • diarrhea
  • stomach pain
  • nausea
  • mucus

Symptoms of a food allergy range from mild to severe, and can include:

  • hives
  • itching
  • wheezing
  • trouble breathing
  • swelling of the lips, tongue, or face
  • belly pain
  • nausea or vomiting
  • diarrhea
  • dizziness or fainting

The most severe form of food allergy is anaphylaxis. Symptoms include swelling in the throat, trouble breathing, a fast pulse, and dizziness. Anaphylaxis is a life-threatening medical emergency.

Severe symptoms like difficulty breathing and tightness of the throat require immediate medical attention. Call 911 or go to an emergency room right away.

If you often get symptoms like belly pain, nausea, or diarrhea after you eat, see your primary care doctor or gastroenterologist. The doctor may refer you to an allergist for testing.

Skin or blood tests can help your allergist figure out whether you have a food allergy. A skin allergy test involves placing a small piece of the suspected food just under your skin. If a red bump forms, it’s a sign that you might be allergic to it.

A blood test checks for the antibody IgE in a sample of your blood. It may take a week or more for you to get results.

While these tests can be helpful in identifying food allergies, they can also produce false positives. This means the test may show you’re allergic to a food, even though you don’t have any allergy symptoms when exposed to it.

If the test shows you’re allergic to a specific food, your doctor may recommend that you come into their office for an oral food challenge. You’ll be given a small amount of food while they closely monitor you for signs of a reaction. This test provides quick results and is the most reliable way to confirm if you’re truly allergic.

One way to treat food allergies is by eliminating the offending foods from your diet. First, you need to figure out which foods cause you to react. You can do this by keeping a diary of everything you eat for a few weeks.

Look for foods that are hard for some people with IBD to tolerate, such as:

  • milk and other dairy products
  • eggs
  • tree nuts such as walnuts, almonds, cashews, and pecans
  • wheat
  • soy
  • fish and shellfish
  • artificial sweeteners

Once you’ve identified a few possible trigger foods, cut them out of your diet. Then reintroduce the foods, one at a time, to see if your symptoms come back.

It’s important to be under a doctor or dietitian’s supervision when you try an elimination diet. Cutting foods out of your diet could leave you lacking in important nutrients. Your dietitian might recommend you substitute other foods to get the nutrition you need or take a supplement.

Immunotherapy is another treatment for food allergies. You’ll do this under the direction of an allergist. Your doctor will give you very small amounts of the food that triggers your reaction. Gradually, you’ll eat more and more of the food until your body begins to tolerate it.

You can also ask your doctor about probiotics, which are supplements containing healthy bacteria. A 2016 study showed that a combination of immunotherapy and probiotic supplements reduced symptoms of both UC and food allergies.

Symptoms like bloating and diarrhea after you eat are most likely signs of a food sensitivity or intolerance. If you have symptoms like hives, shortness of breath, or wheezing, you might have a food allergy.

See your primary care doctor or the doctor who treats your UC for advice. An allergist can diagnose a food allergy and recommend a treatment.