Gastrointestinal infections can cause symptoms such as diarrhea and vomiting. They can be bacterial, viral, or parasitic. Treatment may include rest, hydration, and medication.

The treatment a doctor recommends can depend on the type of gastrointestinal infection.

This article breaks down the symptoms, types, and treatments for a variety of common gastrointestinal infections.

a man holding his stomach because of Gastrointestinal infectionShare on Pinterest
A person with a gastrointestinal infection may experience nausea, stomach cramps, and loss of appetite.

There are three main types of gastrointestinal infections:

  • bacterial
  • viral
  • parasitic


Bacterial gastrointestinal infections include foodborne infections and food poisoning.

Common sources of bacterial gastrointestinal infections include:

While almost any contaminated food can cause an infection, some foods pose more risks than others. These include:

  • undercooked or raw meat, eggs, or poultry
  • unpasteurized dairy and juices
  • contaminated water
  • food, particularly meat and egg products, that is not refrigerated well
  • deli meats
  • unwashed or raw fruits and vegetables

Additionally, people who have bacterial gastrointestinal infections may spread the bacteria to the food they touch. This food could then infect someone else if they consume that food.


Viral gastrointestinal infections are very common, and often people refer to these as the stomach flu.

Norovirus is a type of viral gastroenteritis. According to the National Institute of Diabetes and Digestive Diseases (NIDDK), norovirus causes 19 to 21 million cases of stomach flu in the United States each year.

Other viruses that can cause viral gastrointestinal infections are less common in the U.S.

Vaccines can prevent some types of viral infections, including rotavirus.


Intestinal helminths, or worms, and protozoan parasites cause parasitic gastrointestinal infections.

The two most common parasitic infections are giardiasis and cryptosporidiosis.

Contact with human feces in the soil can spread these parasites. People can also contract these infections by drinking or swimming in contaminated water.

Some parasitic infections can spread from animals to humans. These include toxoplasmosis, which people can come into contact with in cat feces.

Most gastrointestinal infections have similar symptoms, though they may vary in severity.

Symptoms of gastrointestinal infections include:

  • diarrhea
  • nausea
  • vomiting
  • stomach cramps
  • loss of appetite
  • a fever
  • muscle aches
  • an electrolyte imbalance
  • gas and bloating
  • unintentional weight loss

Most viral gastrointestinal illnesses start suddenly and last less than a week, though they may continue longer.

Bacterial infections may present similarly to viral infections, but some may be more likely to cause a high fever or bloody diarrhea.

Parasitic gastrointestinal infections often cause blood or mucus in diarrhea and may last until a person receives treatment.

Most people do not need to see a doctor if they have symptoms of gastrointestinal infection.

However, the NIDDK recommend seeing a doctor right away if a person experiences any of the following symptoms:

  • severe pain in the abdomen
  • a high fever
  • diarrhea that lasts longer than 2 days
  • black or tarry stools
  • six or more loose stools per day
  • frequent vomiting
  • changes in mental state

Adults should also see a doctor for a gastrointestinal infection if they cannot keep down liquid or show signs of dehydration, including:

  • extreme thirst
  • dark, infrequent urine
  • sunken cheeks and eyes
  • a dry mouth
  • skin that does not flatten back after pinching
  • lightheadedness

Some individuals should always consult a doctor about gastrointestinal infections because they are at higher risk of complications. These include:

  • pregnant women
  • people with a compromised immune system
  • older adults
  • infants and young children

Some gastrointestinal infections, particularly parasitic infections, require a prescription medication from a doctor. However, many cases of gastrointestinal illnesses will get better without medical treatment or intervention.

Most of the time, a person can help their immune system fight off the infection at home by getting plenty of rest and drinking lots of water.

In severe cases, a person may need supportive care for rehydration in the hospital.

People with a gastrointestinal infection can help treat the illness at home by:

  • resting
  • taking sips of water frequently
  • using over-the-counter medications with caution
  • eating bland, easy-to-digest food when feeling better

Many gastrointestinal illnesses are highly contagious, but there are many steps a person can take to help prevent them from spreading.

The Centers for Disease Control and Prevention (CDC) recommend a person do the following to prevent viral infections:

  • wash their hands well with soap and water
  • not substitute alcohol-based hand sanitizer for hand washing
  • practice food safety, including washing fruits and vegetables and cooking meats
  • avoid cooking or preparing food for another person while ill
  • disinfect hard surfaces with bleach
  • carefully launder clothes or linens

To avoid a bacterial gastrointestinal infection, the CDC recommend:

  • washing hands and surfaces before, during, and after food preparation
  • separating raw meats, seafood, poultry, and eggs from prepared food
  • cooking food to a safe internal temperature and avoiding undercooked food
  • refrigerate food below 40°F (4°C) within 2 hours of cooking

People who are at higher risk of gastrointestinal infections and their complications should also avoid undercooked or raw foods from animals, unpasteurized dairy products and juices, and raw sprouts.

To avoid a parasitic gastrointestinal infection, a person should:

  • practice good hygiene including hand washing
  • avoid contaminated food and water
  • use caution when traveling to areas where parasitic infections are more common
  • take precautions to prevent toxoplasmosis, including avoiding the cat litter box if pregnant

Gastrointestinal infections can be bacterial, viral, or parasitic. No matter the cause, the symptoms are unpleasant and can include diarrhea, abdominal cramping, and nausea.

Most infections will resolve on their own, but if a person has symptoms of dehydration or other complications, they should see a doctor.

In the meantime, it is essential to get plenty of rest and fluids to facilitate a speedy recovery.