Raw flour can carry harmful bacteria like E. coli and Salmonella, and heat treating it is the only reliable way to kill those pathogens before you eat it. This matters most when you’re making edible cookie dough, cake batter you plan to taste, or any no-bake recipe that uses flour. The CDC has investigated outbreaks linked to raw flour or cake mix in 2016, 2019, 2021, and 2023.
Raw Flour Is a Raw Agricultural Product
Most people don’t think of flour as “raw,” but it is. Wheat grows in open fields where it’s exposed to soil, water, insects, and animal waste throughout the growing season. Bacteria from these sources settle on the surface of the grain, and some species can work their way into the inner kernel through the germ or through small cracks caused during harvesting.
Here’s the critical part: nothing in the milling process kills those bacteria. Wheat goes through cleaning, tempering (adding moisture to soften the kernel), and grinding. None of these steps involve heat or chemical treatment. The milling process actually redistributes contaminants, concentrating over 90% of aerobic bacteria into the bran and germ fractions. While the white flour fraction retains fewer microorganisms than bran, it can still carry unsafe levels of pathogens.
Bacteria can’t actively grow in dry flour because there isn’t enough available water. But they survive in a dormant state, retaining their ability to multiply the moment the flour is mixed into batter, dough, or any moist environment. That’s why a bag of flour sitting in your pantry can look perfectly fine and still make you sick if you eat it uncooked.
Which Bacteria Are in Raw Flour
The two main concerns are Shiga toxin-producing E. coli (STEC) and Salmonella. STEC is the more dangerous of the two in flour-related outbreaks. Symptoms typically include severe stomach cramps, profuse and often bloody diarrhea, and vomiting, appearing about 3 to 4 days after exposure (though onset can range from 3 to 8 days). These symptoms generally last 5 to 7 days.
In 5% to 10% of people who get sick from STEC, the infection progresses to hemolytic uremic syndrome (HUS), a serious complication that damages red blood cells and can lead to kidney failure. HUS typically develops 4 to 7 days after diarrhea begins. Young children and older adults face the highest risk.
The 2019 flour-linked outbreak, caused by E. coli O26, sickened 21 people across 9 states. Fifteen percent of those people were hospitalized. No one died in that outbreak, but flour-related E. coli infections have the potential to be life-threatening, especially in vulnerable populations.
How Heat Treating Works
Heat treating flour means raising its internal temperature to at least 165°F (74°C), the standard threshold for killing E. coli and Salmonella. At this temperature, the proteins inside bacterial cells denature and the organisms die. Regular baking achieves this naturally, which is why fully baked cookies and cakes are safe. The problem arises when flour is used in recipes that skip baking entirely or when people taste raw dough.
At home, you have two practical options: the oven and the microwave.
For the microwave method, spread your flour in a microwave-safe bowl and heat it on high in 30-second intervals. Stir thoroughly between each round to distribute the heat evenly, since microwaves create hot spots that can leave cold pockets where bacteria survive. Repeat for a total of 1 to 2 minutes, checking the temperature with an instant-read thermometer. You’re done when the flour reads 165°F throughout.
For the oven method, spread flour on a sheet pan in a thin, even layer and bake it at 300°F for about 5 minutes, stirring halfway through. Again, verify with a thermometer. The oven provides more even heat than the microwave, but it takes slightly longer.
What Heat Does to the Flour Itself
Heat treating doesn’t just kill bacteria. It changes the flour’s physical properties in ways that can actually improve certain recipes. Heat damages starch granules, breaking down their molecular structure and partially gelatinizing the starch even without much water present. This creates a flour that absorbs moisture differently and produces a softer, slightly thicker texture in no-bake applications.
Cakes made from heat-treated flour have shown better dough stability, stronger foam structure, and increased volume. The starch changes also affect viscosity, which translates to improved mouthfeel in finished products. For edible cookie dough specifically, heat-treated flour produces a smoother, less gritty texture than raw flour would.
The proteins in flour change too. Wheat gluten, the combination of gliadin and glutenin that gives dough its stretch, begins to cross-link and form new bonds when heated. Starting around 140°F (60°C), the gluten proteins lose some of their elastic extensibility. At higher temperatures, protein aggregation increases further, which is one reason heat-treated flour behaves differently in recipes that rely on gluten development. For no-bake recipes this is a non-issue, but you wouldn’t want to heat treat flour and then use it to make bread, where strong gluten networks are essential.
When You Need to Heat Treat Flour
Any recipe where the flour won’t reach 165°F during cooking requires heat-treated flour if you want it to be safe. The most common scenarios include edible cookie dough, no-bake energy bites, cake batter dips, homemade playdough (especially for young children who might eat it), and holiday recipes where raw batter is part of the appeal.
You also need to think about cross-contamination. If you’re rolling out sugar cookies and a child grabs a piece of raw dough off the counter, that flour hasn’t been baked yet. The same applies to tasting batter while mixing. These small exposures are exactly how most flour-related illnesses happen: not from someone sitting down to eat a bowl of raw flour, but from casual contact with uncooked dough and batter.
If you’re buying commercial “safe to eat” cookie dough or edible dough products, the flour has already been heat treated during manufacturing. Some brands now sell pre-treated flour specifically for home use in no-bake recipes, saving you the step of doing it yourself.

