The effect of commercially available chestnut and mimosa tannins in vitro (experiment 1) or in vivo (experiment 2) on the growth or recovery of Escherichia coli O157:H7 or generic fecal E. coli was evaluated. In experiment 1, the mean growth rate of E. coli O157:H7, determined via the measurement of optical density at 600 nm during anaerobic culture in tryptic soy broth at 37°C, was reduced (P < 0.05) with as little as 400 μg of either tannin extract per ml of culture fluid. The addition of 200, 400, 600, 800, and 1,200 μg of tannins per ml significantly (P < 0.01) reduced the specific bacterial growth rate when compared with the nontannin control. The specific growth rate decreased with increasing dose levels up to 800 μg of tannins per ml. Bacterial growth inhibition effects in chestnut tannins were less pronounced than in mimosa tannins. Chestnut tannin extract addition ranged from 0 to 1,200 μg/ml, and a linear effect (P < 0.05) was observed in cultures incubated for 6 h against the recovery of viable cells, determined via the plating of each strain onto MacConkey agar, of E. coli O157:H7 strains 933 and 86-24, but not against strain 6058. Similar tests with mimosa tannin extract showed a linear effect (P < 0.05) against the recovery of E. coli O157:H7 strain 933 only. The bactericidal effect observed in cultures incubated for 24 h with the tannin preparations was similar, although it was less than that observed from cultures incubated for 6 h. When chestnut tannins (15 g of tannins per day) were infused intraruminally to steers fed a Bermuda grass hay diet in experiment 2, fecal E. coli shedding was lower on days 3 (P < 0.03), 12 (P = 0.08), and 15 (P < 0.001) when compared with animals that were fed a similar diet without tannin supplementation. It was concluded that dietary levels and sources of tannins potentially reduce the shedding of E. coli from the gastrointestinal tract.