Tofu can go bad even before if it is opened, if it is not kept refrigerated. Once it is opened, it should be kept in fresh water in the fridge; change the liquid every day to be on the safe side, and it should be okay for a few days. Silken tofu will usually start to get a yellowish tinge, and smell slightly funny; firm tofu will do the same if allowed to dry out, but is more likely to go milky-white and slimier if kept in water as it should be.
Bacteria including assorted Bacilli and Enterobacter sakazakii feed on the fat and the protein, spoiling the flavour and releasing noxious gases. Food poisoning from spoiled tofu is rare, but not unheard-of, especially from tofu stored in open containers before it is sold; suspect tofu should be treated with care and cooked well or discarded.
Take heed, gentle reader, and beware of tofu turned bad! Gather round now, as I tell you the true tale of my own battle with bean curd gone over to the Dark Side...
Reaching into my cupboard for something to eat, I see it there on the lower shelf.
One of those big blocks of tofu you can buy in Chinatown, which come swimming in water in a whacking great plastic box with a see-through lid. Once rectangular, the box is now swollen like an over-inflated air pillow, threateningly bulbous - it looks like it could explode at any moment. I really should have kept it in the fridge.
Careful not to jar it with any sudden movements, I move it onto the counter; it rocks a little.
I tap the plastic film gently, testing the pressure. It is firm, obviously under great tension; with that amount of pressure it would be a disaster waiting to happen in a normal bin - a controlled tofu release is the only option, so I grab a pointy straw and head up to the toilet.
Placing the box on the rim of the toilet, where it teeters, I open the air vent and prepare to pierce the film to release whatever noxious gases are within through the straw, which is angled towards the bowl just in case.
I stab with the straw - too hard, too hard! - I've poked through into the fetid tofu-water inside, and under the pressure of the decay-gases it fountains out - I lose control of the straw, and this faintly yellowish liquid spurts a foot or two into the air, spattering the toilet seat, the floor and me. I try pointing the straw back down into the bowl, but it just shoots out around the sides of it; after a few seconds a glob of floating tofu blocks the hole, but the box is still bulging; it isn't over yet. The liquid has a strange, yet familiar reek to it - dried vomit? A hint of Parmesan cheese maybe? - whatever it is, it is wrong wrong wrong for tofu, and it makes me gag.
I have only succeeded in injuring the tofu, so I draw my Swiss army knife from my pocket to administer the final blow. As I slide the blade through its plastic covering it sputters and exhales its last foul breath. I drain it of its juices and gingerly peel back the remains of the film; as a precaution I dismember the tofu before flushing it away.
I clean up the mess as best I can, but a nauseous tang lingers around the toilet for days.
So that, my friends, is what happens when tofu goes bad.