Treatment of diarrhea depends on the severity and duration as well as the cause. If diarrhea is uncomplicated and goes away within a few days, no specific treatment and only supportive care may be necessary. Supportive care typically includes drinking plenty of fluids (usually that contain salts and minerals) to avoid dehydration and sometimes modifying the diet. This may involve eating soft, bland foods such as bananas, rice, toast or crackers and avoiding foods that contain caffeine or ones with high fat content.
If the diarrhea is severe, bloody, contains mucus, and/or has lasted more than two days (24 hours in infants), you should consult your healthcare provider. Tests will be ordered to identify the cause of the diarrhea and then the treatment will be tailored to the cause.
For viral infections and many pathogenic bacterial infections, the main treatment is to address dehydration to make sure that the person replaces lost fluids and electrolytes. Infants and those with severe dehydration may not be able to drink enough to meet their re-hydration needs and may have to be hospitalized for a short period of time.
Most bacterial infections of the gastrointestinal tract resolve by themselves in healthy people. In some cases, antibiotics actually prolong the shedding of the pathogen and may lead to carrying the organisms for months ("carrier state"). People with underlying diseases that compromise the immune system, such as cancer, may be treated with antibiotics since they may not be able to clear the infection on their own.
Most parasitic infections are treated, although a few may resolve on their own. With some bacterial and parasitic infections, a healthcare practitioner may treat the entire family even if only one member is obviously affected.
People should talk to their healthcare provider before taking an over-the-counter anti-diarrhea medicine. Diarrhea is one of the methods that the body uses to help rid itself of the infection. Anti-diarrhea medication can slow down or prevent this from happening, potentially prolonging the length of the illness and sometimes making the infection worse.
Treating non-infectious causes of diarrhea may be less straightforward and more difficult than infectious causes. It may involve treating the underlying condition once it is identified. It may require diet adjustments, long-term treatment or ongoing nutritional support. For diarrhea caused by food sensitivities or intolerances such as lactose intolerance, for example, treatment often involves avoidance of the suspected cause. A diagnosis of celiac disease may require avoidance of all foods containing gluten.