three different bottles with oil

Food spoilage – Rancidity and food chemistry

Ever found back an old bag of peanuts that just didn’t taste or smell good anymore? A little sour maybe but otherwise just not as good as a fresh peanut? Or have you had a similar experience, but with butter? It’s a common challenge for a lot of fatty foods, also including meats, potato chips or fatty fish for instance. We tend to say these products have turned rancid. Rancidity isn’t necessarily harmful but it certainly doesn’t improve the taste or flavour of your food and thus causes food spoilage.

Rancidity has several causes and can often be prevented or delayed to a certain extent. We’ll zoom in that and more with regards to rancidity in this post.

What is rancidity?

Different people from different cultures will describe rancidity in a different way. Generally speaking the term rancid is used when a product has a certain off flavour and smell. In most western cultures a rancid product is regarded as spoiled and not suitable for consumption. However, in other cultures rancid products are part of a region’s cuisine (e.g. yak butter).

From a chemist’s perspective rancidity is a defined a bit more specifically. It is defined as two types of reactions that can occur to fats and oils. More about those reactions further down.

What are fats and oils?

Before digging into the chemical definition of rancidity it is important to understand what fats and oils are. Both are triglycerides which describes a specific chemical structure. In short these molecules consist of a backbone (glycerol) with three fatty acids attached to them. The structure and length of these fatty acids determines the behaviour of a triglyceride and whether it is a fat or oil, read more in our introductions to fats.

fatty acid
An example of a fatty acid.

A fatty acid essentially is a long chain of carbon atoms with an acid group at the end. The acid group reacts to the glycerol and thus remaining is this long chain of carbon atoms. There are two ways carbon atoms can be attached to each other in this chain. They can be attached by a single bond between them (as is the case in the example above) or they can be attached with a double bond (two lines between the carbon atoms.

If a fatty acid contains such a double bond it is an unsaturated fatty acid. If the carbon atoms are solely attached through single bonds it is a saturated fatty acid. This concept will be important later on when discussing oxidative rancidity. Olive oil contains quite a lot of unsaturated fatty acids which we discussed in the post on olive oil.

Chemical definition of rancidity

Chemists define roughly two ways a product can turn rancid:

  1. Oxidative rancidity: a reaction of the triglycerides with oxygen
  2. Hydrolytic rancidity: a reaction causing the fatty acids to be released from the glycerol backbone and thus become free fatty acids

Commonly speaking, when people refer to rancidity they will be referring to oxidative rancidity and less so to the hydrolytic variety.

What is oxidative rancidity?

Oxidative rancidity is a reaction of fatty acids with oxygen. More specifically it is the reaction of double bonds in unsaturated fatty acids with oxygen. Upon reacting with oxygen very reactive components (among others hydroperoxides) will be formed. These will react in all sorts of ways, resulting into the flavour and odor molecules that we taste and smell on a rancid product.

Oxidative rancidity will always require oxygen to occur. Apart from that though, relatively little is required to start the reaction, it can already be initiated by light.

Oxidative rancidity reaction mechanism

Below you can find the reaction mechanism depicting the start of oxidative rancidity. Oxidative rancidity is an oxidation reaction which starts by an unsaturated fatty acid forming a radical (the dot next to the molecules represents a radical). Radicals are highly reactive and will always want to react with something else again. Radicals can be formed spontaneously, for example under influence of light as well as the presence of certain metals.

The newly formed radical will then react with oxygen. It will still be a radical but with the oxygen atoms attached to it. It will now need to react with something that’s not a radical to get rid of its radical properties. In this example that is molecule LH. LH can be another unsaturated fatty acids, but it can also be another molecule, for example an anti-oxidant.

Oxidative rancidity reaction mechanism
Example of a reaction mechanism of oxidative rancidity. R represents the rest of a fatty acid chain. L can represent another fatty acid an anti-oxidant or other type of molecule.

This series of reactions shows a pathway that will commonly occur in oxidative rancidity. However, since these radicals are so reactive, they will also react with other components. It’s during those reactions that those rancid odour and flavour molecules are formed

Role of anti oxidants

Anti-oxidants are molecules that can stop this radical chain of reactions. Anti-oxidant can ‘absorb’ the radical, but instead of becoming yet another reactive radical, anti oxidants won’t continue reacting with other molecules and they will stop the chain. In your body radicals are formed all the time. Antioxidants are present throughout your body as well, to stop these reactions again.

What is hydrolytic rancidity?

Sign up to our weekly newsletter to be updated on new food science articles.

The second type of rancidity is caused by a hydrolytic reaction. Such a reaction is one in which a molecule reacts with water and as a result a molecule is cleaved in two. In the case of fats and oils the hydrolytic reaction will occur at the point where the fatty acids are connected to the glycerol. In a hydrolytic reaction the fatty acid gets split off from the glycerol, forming a free fatty acid.

A lot of (small) free fatty acids have quiet a strong smell which makes the product taste rancid. An example of this is butyric acid in butter which is a smelly compound that contributes to that off flavour of butter we discussed at the start.

Hydrolyitc rancidity is catalyzed by enzymes

The hydrolysis reaction to cause rancidity isn’t activated as easily as the oxidation reaction. In most cases it is catalyzed by enzymes, in most cases lipases. These enzymes are are naturally present in a lot of foods.

In some cases micro organisms produce lipases which will then induce hydrolytic rancidity.

Preventing rancidity

Since oxidative and hydrolytic rancidity are caused by two different mechanisms they should also be prevented in a different way.

For preventing oxidative rancidity there are four main routes to explore:

  1. The first way to prevent rancidity is to eliminate oxygen. Think of vacuum packaging a product.
  2. Prevent using unsaturated fatty acids, saturated ones won’t oxidize. That said, this isn’t always possible, olive oil is not olive oil anymore if it doesn’t have those unsaturated fatty acids.
  3. Prevent the formation of those first radicals. Since light (especially UV light) can initiate this formation it would be wise to eliminate that (think of aluminum cans in which olive oil is packaged).
  4. ‘Catch’ anti-oxidants as soon as they are formed. This can be done by adding anti-oxidants for instance.
  5. Since metals van also induce radical formation another method is to ‘catch’ or prevent the presence of these metals.
  6. Last but not least, in most cases storing at a cooler temperature will slow down, but not fully prevent, oxidation.

In the case of hydrolytic rancidity prevention focuses on slowing down the activity of enzymes to reduce hydrolysis. This can be done by lowering the temperature, to make them virtually inactive. It can also be done the other way around, shortly heating the product to deactivate the enzymes.


A very interesting article by the Nordic Food Lab on experiments they did with rancid butter. It also covers a discussion of the cultural differences with regards to rancidity. They wrote a follow up post which digs more into the chemical details we discussed here as well.

GCCA, Rancidity Antioxidants, 2012/09, link ; direct link no longer available

Research article discussing hydrolytic rancidity of rice bran.

Very extensive description of the possible reaction mechanisms, however, hard to understand without a background in chemistry.

SSERC, Oxidative rancidity, link ; a good resource for teachers and students

Elias, R., How Good Oil Goes Bad, 2014, Penn State University, link ; discusses ways to prevent rancidity.

Newsletter Updates

Enter your email address below to subscribe to our weekly newsletter


  1. 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

    • Hi Holli,

      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!

  2. 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?

    • Hi Memo,

      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!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.