Learn the science behind:
The Chemistry of Rancidity in Food
Ever found back an old bag of peanuts that just didn’t taste or smell good anymore? Maybe with a bit of a musty smell to it? Or maybe you had a similar experience, but with butter? That didn’t just smell weird, but also looked very orange in color?
If so, you’re not alone. Most of us will at some point have encountered a so-called rancid food. It’s a common challenge for a lot of fatty foods caused by the oxidation of fats and oils. Rancid foods aren’t necessarily harmful, but with the exception of a few foods, most rancid foods no longer taste good. As such, we’d better try to prevent or delay these chemical reactions from happening in the first place.
- Oxidative rancidity requires oxygen
- Hydrolytic rancidity requires water
- Keep out oxygen (oxidative)
- Keep out light (oxidative)
- Use saturated fats only (oxidative)
- Keep it cool (oxidative & hydrolytic)
- Break down enzymes (hydrolytic)
- Add anti-oxidants (oxidative)
- Trap metals (oxidative)
- Rancidity is irreversible
Rancidity is caused by broken-down oils
It is not by chance that fatty foods especially are prone to turning rancid and developing off-flavors! Rancidity is caused by fats, more specifically, triglycerides, that are broken down in some way.
All fats and oils in food are made up of triglycerides. A triglyceride is a type of molecule with a characteristic structure. It has a backbone called glycerol. Attached to this backbone are three so-called fatty acids. These are chains of carbon atoms with varying lengths. Under the right conditions, triglycerides can take part in chemical reactions, causing them to break down. There are two main ways in which this can happen:
- Oxidative rancidity: triggered by a reaction of triglycerides with oxygen
- Hydrolytic rancidity: caused by a reaction of triglycerides with water
Depending on the product and how it’s been packaged and processed, both chemical reactions can occur, or just one of the two. Generally speaking, oxidative rancidity is more prevalent than hydrolytic rancidity.
Oxidative rancidity requires oxygen
Oxidative rancidity is caused by an oxidation reaction between the double bonds in unsaturated fatty acids and oxygen. During this reaction a range of very reactive components is formed such as hydroperoxides. These continue to react in further chemical reactions, resulting in the formation of various flavor and odor molecules such as ketones, volatile aldehydes and smaller fatty acids. These smaller molecules can leave the product and enter our noses, causing the product to smell and taste old, or rancid.
Only unsaturated fatty acids can oxidize
Only unsaturated fatty acids can take part in this reaction. In saturated fatty acids all carbon atoms are linked to one another through a single bond. However, in unsaturated fatty acids two or more carbon atoms are linked together through a double bond. This double bond is naturally more unstable than a single bond and more prone to taking part in chemical reactions.
Since oils contain more unsaturated fatty acids than solid fats, they are naturall more prone to this chemical reaction. It’s why people will often refer to oil oxidation as being a cause of rancidity.
Hydrolytic rancidity requires water
The second type of rancidity is caused by a hydrolytic reaction in which a triglyceride reacts with water. As a result the fatty acid gets split off from the glycerol, forming a free fatty acid. A lot of (small) free fatty acids have strong smells which causes the product to turn rancid. A common example of this is butyric acid. This fatty acid is prevalent in butter. As long as it is secured in a triglyceride, you won’t smell it. But, once it’s set free, it has a characteristic ‘rancid’ smell and flavor.
For hydrolytic rancidity to occur both water and triglycerides need to be present. Higher temperatures and the presence of the right types of enzymes, lipases, catalyze the reaction. Taking butter as an example again, it happens to contain quite a few of these enzymes that help speed up the reaction, explaining why butter is so prone to turning rancid.
The enzyes don’t have to be present naturally. In some cases microorganisms can produce enzymes which then catalyze the hydrolysis reaction.
When is a food rancid?
It is hard to say when a food is rancid. It is often a sliding scale. Products will slowly turn rancid over time. Initially, you might not yet smell or taste the rancidity. There simple aren’t enough flavor and odor molecules yet. But when the reactions continue to proceed, it will turn more noticeable rancid.
To complicate matters, whether a food is perceived as rancid by someone, depends on that person as well. Some people are more sensitive to the smells and flavors than others. Also, it may depend on how a product or ingredient has been used. Other strong smells and flavors may be able to hide rancidity to some extent.
How to analyze rancidity
Seeing as how rancidity itself is a subjective matter, it is also very hard, if not impossible, to use analytical techniques to determine whether something has turned rancid. The presence of oxidized fatty acids for instance does not indicate the food is rancid. It may still taste great.
The best you can do is use techniques to follow the progress of these reactions. If you then simultaneously smell and taste the product, you’ll be able to link analytical results to the quality of the final product. Some examples of these techniques are:
- Peroxide value (pv): peroxides are formed during oxidation reactions and can be a measure for the extent to which the reaction is taking place. It is a good measure for the rate at the start of the chemical reactions. However, they will continue to react into other components. As a result, they aren’t a good measure for final state of oxidation.
- Free fatty acids: labs are able to analyze the amount of free fatty acids in a food. This can be a decent measure for the occurrence of hydrolytic rancidity.
- Oxidative stability index: during this test a food product is exposed to high temperatures and plenty of oxygen while tracking the formation of volatile oxidation products.
Not all rancid food is ‘bad’!
Rancid nuts, rancid butter, rancid olive oil, generally speaking, people will not be appreciative of their newly developed flavors and smells. However, rancidity isn’t always a bad thing! Yak butter for instance is technically speaking rancid, but it’s supposed to be that way. The accompanying flavors and smells are what make this product unique and appreciated by its makers.
How to prevent rancidity
There are several ways to prevent or slow down rancidity in foods. The best suitable method depends on the product itself, but also on the mechanism that causes the rancidity. Oxidative and hydrolytic rancidity both require slightly different preventative measures.
Keep out oxygen (oxidative)
Oils can only oxidize in the presence of oxygen. As such, keeping oxygen out is the best way to prevent oxidative rancidity from happening. The most commonly used method to do so is by using appropriate packaging. Manufacturers will ensure that there is no oxygen within a pack to prevent oxidation.
This is also why products like potato chips turn rancid so much faster once you’ve opened the package. Once you’ve let air in, which is full of oxygen, the chemical reactions get started and the product will start turning rancid.
Packaging isn’t the only way to keep out oxygen though! One of the reasons, apart from being tasty, nuts are covered in chocolate is to slow down oxidation. The chocolate layer keeps the oxygen (and light) out. As such, chocolate-coated nuts are far less prone to oxidation and rancidty than pure nuts are!
Keep out light (oxidative)
Oxidation requires exposure light to get started. By keeping the light out, you can slow down the reaction considerably. Again, packaging is your best friend here and it’s why so many olive oils are packaged in either aluminum cans or dark-colored glass bottles. They serve to keep the light out.
Use saturated fats only (oxidative)
Saturated fatty acids cannot oxidize. As such, fats that only, or mostly, contain saturated fatty acids, are less prone to turning rancid. They can only turn rancid through the hydrolysis pathway. When formulating a product, this might be an important reason to choose one fat over the other.
Keep it cool (oxidative & hydrolytic)
Chemical reactions resulting in rancidity all proceed more slowly at lower temperatures. Most of the enzymes involved in hydrolytic rancidity are no longer active at all at low temperatures. It’s why storing butter or beef tallow in the fridge, or even freezer keeps it fresh for longer.
Break down enzymes (hydrolytic)
Enzymes catalyze hydrolytic rancidity, but, they aren’t very stable themselves. A slight heat treatment can break them down. Unfortunately, this can’t always be done, since it will also impact the rest of the product. Butter for instance contains a considerable amount of these enzymes, but heating butter would irreversibly change its properties as well!
Heat the oil seeds
A lot of the enzymes responsible for hydrolytic rancidity in oils are naturally present in the seeds of those oils. When the oil is pressed from those seeds, some of those enzymes also end up in the oil. It is why oils or seeds are pre-heated. The heat inactivates any possible remaining enzymes.
Add anti-oxidants (oxidative)
Vitamin C (ascorbic acid), BHA, tocopherols (vitamin E), BHT, if you see these ingredients on an ingredient list, you’ve likely come across a product that’s prone to turning rancid. The ingredients all serve as anti-oxidants. That is, they can scavenge ‘free radicals’. These are highly reactive components that play a crucial part in the oxidation of fatty acids. Instead of reacting with a fatty acids, the radicals are ‘caught’ by the anti-oxidants, making them harmless.
Trap metals (oxidative)
Another way in which oxidative rancidity can be induced is because of the presence of certain metals. By catching these rancidity can be slowed down as well. Common examples are EDTA, or citric acid (the acid naturally present in lemons).
Rancidity is irreversible
Last but not least, keep in mind that, unless you’ve got some fancy equipment at hand, rancidity is irreversible. There is only so much you can hide in further processing. So, just don’t use rancid nuts or oil for making a dish. It might just ruin it all!
Johnny Draine, Aged Butter part 1: background and basics, Nordic Food Lab, January 21, 2016, link
Johnny Draine, Aged Butter part 2: the science of rancidity, Nordic Food Lab, January 29, 2016, link
Ryan Elias, How good oil goes bad, 2014, Penn State, link
Eurofins, Rancidity, and 5 tests you need to know, link
Fatemeh, Meskaran & Rao, Ramu & Windhauser, Marlene & Prinyawiwatkul, Witoon & Tulley, Richard & Marshall, Wayne. (1999). Prevention of Hydrolytic Rancidity in Rice Bran during Storage †. Journal of agricultural and food chemistry. 47. 3050-2. 10.1021/jf981335r. link
GCCA, Rancidity Antioxidants, 2012/09, link ; direct link no longer available
Vaclavik, Vickie A.., Christian, Elizabeth W.. Essentials of Food Science. Ukraine: Springer New York, 2007. p. 289
Author unknown, 4. AUTOXIDATION AND OTHER LIPID REACTION, link
I questioned “how you could disguise Rancidity?” ……… Which was not answered. I was going to a potluck and begin making my project late at night I discovered that the cookies smelled rancid. I trimmed the edges of all the hazelnut filled wafer cookies.And elected to dust them with cinnamon and cloves. In the morning, I smeared vanilla yogurt on top and added a raspberry topper
Once fat has turned rancid you can’t reverse the process or fix it. You can indeed ‘hide’ it by adding other (strong) flavors. If you only use a little bit of rancid fat in a cookie or bread, chances are the baking process is enough to hide the rancidity. However, if, like in your case, they taste noticeably rancid, your strategy of adding strong spices, icings or e.g. a buttercream, can help hide it indeed. There’s not much else you can do except for starting over with fresh(er) ingredients. Hope the potluck turned out good in the end!
Are there reasonable antioxidants I can add to (let’s say grains) stored food to reduce the rate of oxidative rancidity? And even if food is dried and vacuum packed in plastic bags, doesn’t oxygen eventually permeate all pliable plastics?
To my knowledge, no, there aren’t specific antioxidants you can easily ‘sprinkle’ in during storage. To build upon the grains example, especially whole (milled) grains are sensitive to oxidation since they contain a reasonable amount of fat. To slow this down, it’s often recommended to store them in the freezer (which isn’t that convenient since they take up so much space). Also, making sure they are stored air tight will help. Making this a little more complicated is that these antioxidants often need to be very close to the oxidizing material which isn’t achievable for every product.
Whether or not oxygen permeates plastic depends a lot on the type of plastic. There are plastics that don’t keep out any oxygen and there are plastics that keep out just about any oxygen. If you’d like to learn more about this I suggest googling the term ‘oxygen transmission rate’, you’ll find a whole bunch of information about all types of different materials. In some cases virtually all oxygen can be kept out for years.
Hope that helps!
This is interesting but I have questions. When you freeze dry food, this remove the oxygen and the water. Assuming you are storing correcting in an air tight container with the oxygen removed, this article implies the food will not go rancid. However the freeze drying manufacturers and basically everyone says you cannot freeze dry fatty things or their shelf life diminishes and the fats go rancid. This seems to contradict the info here; are you able to explain the misunderstanding? Can you , therefore, store fatty freeze dried food (or even fats and oils) long term if there is no oxygen and no water?
When you freeze dry food the water is removed, but oxygen isn’t. Oxygen is a different molecule (O2) than water (H2O) and will remain present. The oxygen in the air can still enter and access the food quite easily, removing water doesn’t prevent that. That might resolve your confusion?
To remove the oxygen, you’d have to package the food in a special way, such as using vacuum packaging to pull out all of the air (including oxygen).