Foods to Relieve Constipation

Certain foods can help relieve constipation, a common condition marked by infrequent bowel movements (and sometimes pellet-shaped stools), while other foods can worsen it. Although constipation may require medical treatment in some cases, many people can find relief by eating certain foods and following other smart ways to ease constipation.

A bowl of brown rice
 Groesbeck / Uhl / Photodisc / Getty Images

Fiber-Rich Foods

Following a diet high in fiber-rich foods helps protect against constipation, according to the National Institutes of Health. By consuming 20 to 35 grams of fiber daily, you can help your digestive system form soft, bulky stools that are easy to pass. The American Academy of Family Healthcare providers recommends slowly increasing your intake of high-fiber foods in order to prevent bloating, cramping and gas.

Foods high in fiber include whole grains such as brown rice, barley, and quinoa, certain vegetables and fruits (especially dried fruits), flaxseeds, and legumes such as beans and lentils. Here's a look at the amount of fiber found in specific foods that may help with constipation:

  • navy beans (9.5 grams of fiber per 1/2 cup)
  • kidney beans (8.2 grams of fiber per 1/2 cup)
  • pinto beans (7.7 grams of fiber per 1/2 cup)
  • artichokes (6.5 grams per artichoke)
  • sweet potatoes (4.8 grams in one medium sweet potato)
  • pears (4.4 grams in one small pear)
  • green peas (4.4 grams per 1/2 cup)
  • raspberries (4 grams per 1/2 cup)
  • prunes (3.8 grams per 1/2 cup)
  • apples (3.3 grams in one medium apple)

People with a sensitivity to gluten should opt for vegetables and fruit, quinoa, beans and lentils, nuts and seeds, and brown rice, and avoid grains such as wheat, barley, and rye. Oats may be acceptable if they are certified gluten-free.

When increasing your intake of high-fiber foods, it's important to drink plenty of fluids. Liquids help the body to digest fiber and provide constipation relief by adding bulk to stools. Aim for eight glasses of water per day.

Magnesium-Rich Foods

There's some evidence that running low on magnesium may increase your constipation risk. For instance, a 2007 study of 3,835 women published in the European Journal of Clinical Nutrition found that those with the lowest magnesium intake were the most likely to experience constipation.

Adult males aged 19 to 30 need 400 mg of magnesium daily, while men aged 31 and up require 420 mg. Adult females aged 19 to 30 need 310 mg daily and women aged 31 and up require 320 mg.

Here's a list of magnesium-rich foods that may help fight constipation:

  • almonds (80 mg of magnesium per ounce)
  • cashews (75 mg of magnesium per ounce)
  • cooked spinach (75 mg of magnesium per 1/2 cup)
  • shredded wheat cereal (55 mg of magnesium in two rectangular biscuits)
  • fortified instant oatmeal prepared with water (55 mg of magnesium per cup)
  • baked potato with skin (50 mg of magnesium in one medium potato)
  • peanuts (50 mg of magnesium per ounce)
  • cooked lentils (35 mg of magnesium per 1/2 cup)
  • smooth peanut butter (25 mg of magnesium per tablespoon)

Foods to Avoid for Constipation Relief

Cutting back on refined, processed grains such as white rice, white bread, and white pasta and replacing them with whole grains can boost your fiber intake and protect against constipation.

Reducing your intake of fatty foods, including cheese, ice cream, and meats, may also decrease your constipation risk. In addition, it's important to limit your intake of alcohol and caffeine-containing beverages such as coffee, tea, soda and energy drinks. These foods may promote dehydration, which may in turn trigger constipation.

Using Food for Constipation

To treat constipation effectively, it's important to combine a diet high in fiber-rich foods with certain lifestyle changes such as regular exercise and adequate intake of fluids. In some cases, people may also require further treatment, such as herbal or prescription laxatives or biofeedback. If foods and lifestyle changes alone fail to relieve your constipation, talk to your healthcare provider about other treatment options. Self-treating a condition and avoiding or delaying standard care may have serious consequences.

8 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. MedlinePlus. Constipation.

  2. Cleveland Clinic. Improving your health with fiber.

  3. National Institute of Diabetes and Digestive and Kidney Diseases. Eating, diet, & nutrition for constipation.

  4. Smulders MJM, Van de Wiel CCM, Van den Broeck HC, et al. Oats in healthy gluten-free and regular diets: A perspectiveFood Res Int. 2018;110:3-10. doi:10.1016/j.foodres.2017.11.031

  5. Murakami K, Sasaki S, Okubo H, et al. Association between dietary fiber, water and magnesium intake and functional constipation among young Japanese women. Eur J Clin Nutr. 2007;61(5):616-22. doi:10.1038/sj.ejcn.1602573

  6. NIH Office of Dietary Supplements. Magnesium fact sheet for health professionals.

  7. American Academy of Family Physicians. Fiber: How to Increase the Amount in Your Diet.

  8. National Institute of Diabetes and Digestive and Kidney Diseases. Treatment for Constipation.

Additional Reading
  • American Academy of Family Physicians. "Fiber: How to Increase the Amount in Your Diet".

  • Murakami K, Sasakii S, Okubo H, Takahashi Y, Hoso Y, Itabashi M; Freshmen in Dietetic Courses Study Ii Group. "Food Intake and Functional Constipation: a Cross-Sectional Study of 3,835 Japanese Women Aged 18-20 Years. " J Nutr Sci Vitaminol (Tokyo). 2007 Feb;53(1):30-6.

  • Office of Dietary Supplements. "Magnesium."

  • The National Digestive Diseases Information Clearinghouse. "Constipation". NIH Publication No. 07–2754.

By Cathy Wong
Cathy Wong is a nutritionist and wellness expert. Her work is regularly featured in media such as First For Women, Woman's World, and Natural Health.