Germ-free animals have been used to define the vital role of commensal bacteria on the maturation of the host immune system. However, the role of bacterial residues in diet in this setting is poorly understood. Here we investigated the effect of bacterial contamination in sterile diet on the level of allergic sensitization in germ-free mice. Sterile grain-based diets ST1 and R03 were tested for the level of bacterial contamination. ST1 contained higher amount of bacterial DNA, approximately ten times more endotoxin, and induced higher, TLR4-dependent, cytokine production in dendritic cells compared to R03. In a germ-free mouse model of sensitization to the major birch pollen allergen Bet v 1, feeding on ST1 for at least two generations was associated with decreased production of allergen-specific IgE and IgG1 antibodies in sera in comparison to R03. Furthermore, reduced levels of allergen-specific and ConA-induced cytokines IL-4, IL-5 and IL-13 accompanied by increased levels of IFN-γ were detected in splenocytes cultures of these mice. Our results show that contamination of experimental diet with bacterial residues, such as endotoxin, significantly affects the development of allergic sensitization in germ-free mice. Therefore, careful selection of sterile food is critical for the outcomes of germ-free or gnotobiotic experimental models of immune-deviated diseases.