Stercobilinogen (fecal urobilinogen) is a chemical created by bacteria in the gut. It is made of broken-down hemoglobin. It is further processed to become the chemical that gives feces its brown color.

Bilirubin is a pigment that results from the breakdown of the heme portion of hemoglobin. The liver conjugates bilirubin, making it water-soluble; and the conjugated form is then excreted in urine as urobilinogen, giving urine its color. In the intestine, bilirubin is converted by bacteria to stercobilinogen. Stercobilinogen is absorbed and excreted by either the liver or the kidney. Stercobilinogen is oxidized to stercobilin, which is responsible for the pigmentation of feces.

In early liver disease, impaired biliary excretion causes sterocobilinogen to be absorbed mostly by the kidney, and, therefore, stercobilinogen will appear in the urine in excess as urobilinogen. This is a marker of early liver disease.