The pain, tenderness, bleeding, and intense itching that accompany hemorrhoids are often enough to drive you up the wall.

Also known as piles, these distended or swollen veins in the anus and lower parts of your rectum can clot or bulge if left untreated, potentially requiring surgery (1Trusted Source, 2Trusted Source).

Fortunately, some foods can help alleviate symptoms — and even help prevent piles in the first place (3Trusted Source).

Here are 15 helpful foods for hemorrhoids.

When trying to avoid or prevent piles flare-ups, one major rule of thumb is to make sure you’re getting enough fiber (4Trusted Source).

You can get two types of fiber from food — soluble and insoluble. While the soluble kind forms a gel in your digestive tract and can be digested by friendly bacteria, insoluble fiber helps bulk up your stool (5Trusted Source, 6Trusted Source, 7Trusted Source).

To promote a healthy gut, you need both.

Legumes are the edible seeds of plants in the Fabaceae family. They include beans, lentils, peas, soybeans, peanuts, and chickpeas.

They’re loaded with both kinds of fiber but especially rich in the soluble type (8Trusted Source, 9Trusted Source).

For instance, 1 cup (198 grams) of cooked lentils packs nearly 16 grams of fiber. That’s about half of the recommended fiber intake (10Trusted Source).

Most adults should get 21–38 grams per day, though this may vary depending on your age and sex (11Trusted Source).

Lentils and other legumes can bulk up your stool, making it less likely that you have to strain when going to the bathroom. This can help prevent hemorrhoids or ease symptoms (12Trusted Source).

Like legumes, whole grains are nutritional powerhouses. That’s because they retain their germ, bran, and endosperm, which are loaded with beneficial components like fiber (7Trusted Source, 13Trusted Source).

Whole grains are especially rich in insoluble fiber. This helps move your digestion along, which can help reduce pain and discomfort associated with piles (13Trusted Source).

Keep in mind that whole grains go beyond hearty whole-wheat flour and bread. While these are good options, this category also includes barley, corn, spelt, quinoa, brown rice, whole rye, and oats (13Trusted Source).

Oatmeal is an especially good option to include in your diet when you’re trying to reduce symptoms of piles.

It contains a specific kind of soluble fiber called beta-glucan, which benefits your gut microbiome by acting like a prebiotic. Prebiotics help feed the friendly bacteria in your gut (14Trusted Source, 15Trusted Source).

When shopping for oatmeal, keep in mind that steel-cut oats take longer to cook but are less processed. They provide a more toothsome bite and about 5 grams of fiber per 1/4-cup (40-gram) serving of dry oats, compared with 4 grams for quick-cook or rolled oats (16Trusted Source, 17Trusted Source).

Cruciferous vegetables include broccoli, cauliflower, Brussels sprouts, arugula, bok choy, kale, radishes, turnips, and cabbage (18Trusted Source).

While they’re predominantly known for their anticancer properties, they also deliver an impressive amount of insoluble fiber (18Trusted Source).

For example, 1 cup (76 grams) of raw broccoli provides about 2 grams of dietary fiber, all of which is insoluble. This works to bulk up your stools and keep you regular (19Trusted Source).

What’s more, cruciferous vegetables contain glucosinolate, a plant chemical that can be broken down by your gut bacteria (20Trusted Source).

One study in 17 adults found that increasing intake of cruciferous vegetables by 6.4 grams per pound (14 grams per kg) of body weight diversified their gut microbiome within 2 weeks (20Trusted Source).

Diversity of gut bacteria is linked to a more resilient gastrointestinal system, as well as improved immunity. This, as well as their insoluble fiber content, make cruciferous vegetables a great choice for preventing piles (20Trusted Source, 21Trusted Source).

Artichokes are loaded with fiber, with a raw, medium-sized one (128 grams) packing about 7 grams of this nutrient (22Trusted Source).

Like many fiber-rich foods, artichokes’ fiber helps feed the friendly bacteria in your gut (23Trusted Source, 24Trusted Source).

Two human studies found that inulin — a type of soluble fiber in artichokes — increased the number of beneficial gut bacteria, such as Bifidobacteria and Lactobacilli (24Trusted Source, 25Trusted Source).

This may help prevent the onset of piles or diminish its symptoms by keeping your gut healthy and regular (21Trusted Source, 26Trusted Source).

Root vegetables like sweet potatoes, turnips, beets, rutabagas, carrots, and potatoes are filling and packed with nutrition.

They’re rich in gut-healthy fiber, containing about 3–5 grams per serving.

When it comes to tubers, keep in mind that much of their fiber is harbored in the skin, so be sure to leave it on when you enjoy them (27Trusted Source).

What’s more, cooked and cooled white potatoes contain a kind of carbohydrate known as resistant starch, which passes through your digestive tract undigested. Like soluble fiber, it helps feed your friendly gut bacteria (28Trusted Source, 29Trusted Source, 30Trusted Source).

As this reduces constipation, it may ease piles symptoms.

The best way to incorporate root vegetables into your diet is to roast, steam, sauté, or boil them with their skin on. They’re also wonderful mashed, or cut up and baked skin-on as a substitute for fries.

From summer to winter, squash bring color and fiber to your dinner plate.

There are many varieties, including yellow squash, zucchini, acorn squash, butternut squash, and pumpkin.

The most fibrous of this bunch is acorn squash, which packs 9 grams of this hemorrhoid-fighting nutrient in every cup (205 grams) of baked cubes (31Trusted Source).

Enjoy squash roasted, sautéed, or boiled to help keep your digestive tract moving while warding off piles.

Another great vegetable to help with piles is bell pepper.

Each cup (92 grams) of sliced, mild peppers delivers nearly 2 grams of fiber (32Trusted Source).

While not as fibrous as some of the other vegetables included in this list, bell peppers are very hydrating with a water content of 93% (32Trusted Source).

Along with fiber, this makes your stool easier to pass and prevents straining.

Similarly to bell peppers, celery delivers a lot of water, as well as fiber. This softens your stools and diminishes the need to strain.

One large, 11–12-inch (28–31-cm) stalk provides 1 gram of fiber and consists of 95% water (33Trusted Source).

Slice this crunchy vegetable into salads, add it to soups or stews, or dip the stalks into a bit of your favorite nut butter.

Cucumbers and melons belong to the Cucurbitaceae family (34Trusted Source).

Like bell peppers and celery, they’re delicious ways to bring fiber and water into your digestive tract.

When enjoying cucumber, make sure to leave the skin on, as that will ensure you get the most fiber.

One medium pear packs nearly 6 grams of fiber, which is 22% of your daily fiber needs (11Trusted Source, 35Trusted Source).

Be sure to eat this fruit with the peel on, as that’s where a lot of the piles-defying fiber can be found.

Pears make an excellent snack on their own or can be stewed or tossed into soups or salads.

Like pears, apples boast an impressive amount of fiber.

For instance, one medium apple possesses nearly 5 grams of fiber. What’s more, some of this fiber is pectin, a soluble fiber that creates a gel-like consistency in the digestive tract (36Trusted Source).

This helps soften and bulk up your stool, easing straining and aiding the discomfort associated with piles.

While berries are considered fibrous, raspberries stand out as a fiber-packing powerhouse.

Simply eat 1 cup (123 grams) of raw raspberries for a whopping 8 grams of fiber with 85% water content (37Trusted Source).

Together, these nutrients will make it easier to go to the bathroom without straining.

Boasting both pectin and resistant starch, bananas are an ideal food to incorporate into your diet to calm piles symptoms (38Trusted Source, 39Trusted Source).

One medium, 7–8-inch (18–20-cm) banana provides 3 grams of fiber (40Trusted Source).

While its pectin creates a gel in your digestive tract, its resistant starch feeds your friendly gut bacteria — a great combination to help your hemorrhoids.

Prunes are considered nature’s laxative.

Studies show that eating a moderate amount — up to 10 prunes daily — can improve the consistency of stools and digestive motility among people with constipation (41Trusted Source).

This is attributed not only to fiber but also sorbitol. Sorbitol is a sugar alcohol that your intestines don’t digest well. It draws water into your digestive tract, softening stools and spurring the need to use the bathroom (42Trusted Source).

Stewed prunes pack a bit more water. To make them, simply simmer dried prunes in filtered water for 10 minutes or until soft.

Keeping yourself hydrated will help make stools softer and easier to pass.

How much water you should drink depends on your age, sex, and activity level. Be sure to opt for water the majority of the time. If you need a bit more flavor, infuse it with lemon slices or berries.

You may occasionally reach for other fluids that are low in sugar, such as unsweetened or mildly sweetened teas and clear low-sodium broths.

Generally, drinking eight 8-ounce glasses per day is recommended, but this is arbitrary advice that’s not rooted in scientific evidence. It comes down to what works best for you (43Trusted Source).

It’s a good idea to limit foods that are low in fiber. These can worsen constipation, which can trigger piles.

Low-fiber foods to avoid include:

  • Dairy products. These include milk, cheese, and other varieties.
  • White flour. This flour has had the bran and germ removed, making it less fibrous. Products made from this type of flour include white breads, pasta, and bagels.
  • Red meat. Avoid this type of meat, as it takes longer to digest and may exacerbate constipation.
  • Processed meats. These foods, such as bologna and other cold cuts, are low in fiber and high in sodium, increasing your risk of constipation.
  • Fried foods. These can be hard on your digestive tract and difficult to digest.
  • Salty foods. They may cause bloating and make your hemorrhoids more sensitive.

You should also avoid:

  • Spicy foods. While not necessarily low in fiber, spicy food may increase pain and discomfort associated with hemorrhoids.
  • Caffeinated beverages. These beverages, especially coffee, may harden your stools and make it more painful to use the restroom.
  • Alcohol. Like caffeinated beverages, alcoholic drinks can dry up your stools and exacerbate the discomfort of piles.

Hemorrhoids, or piles, can cause a lot of pain and discomfort.

While certain foods may worsen your symptoms, others can be highly beneficial.

Increasing your fiber intake may help diminish symptoms — as can staying hydrated with plenty of water.

Whole grains, legumes, vegetables, and fruits are loaded with fiber. Eating more of them may help keep you regular and ward off constipation — and therefore piles.

However, if your symptoms don’t improve or worsen, see your healthcare provider to determine the best treatment plan for you.