Honey is delicious, of course, but it’s also unique. Unlike other foods, the sweet substance doesn’t go bad.

How is such a thing possible? Andy Brunning, a chemistry teacher in the UK, breaks it down in a new blog post and infographic on his website Compound Interest. According to Brunning, there are two factors that make honey spoil-proof: low moisture and acidity—and we have bees to thank for both.

Honey is derived from raw flower nectar, which has plenty of water in it. To get that water out, it takes two separate and labor-intensive processes in the beehive:

Once the worker bee returns to the hive, it will regurgitate the nectar solution and pass it on to one of the house bees, who remain in the hive. The house bee will continue the process the worker bee started – for up to 20 minutes, it will regurgitate and re-drink the nectar, continuing to mix it with enzymes and breaking it down further.

Once suitable breakdown has been achieved, the house bee deposits the nectar into the honeycomb in the hive. Then another important step in the process begins. Nectar can be up to 70% water, and this water must be evaporated in order to produce the consistency of honey that we’re all familiar with. The bees achieve this by fanning the honeycomb with their wings in order to encourage rapid evaporation of the water from the nectar mixture. Eventually, the water content of the solution will drop to around 17%, vastly reduced from the content of the original nectar. The conversion of the watery nectar to syrupy honey takes between 1–3 days.

Honey is also more acidic than raw nectar, Brunning says, because the nectar reacts with a variety of acids, the most dominant of which is gluconic aid, produced when the nectar interacts with bee enzymes as it passes through house bees’ bodies.

For the full chemical breakdown, check out the infographic below.

(Click the image to enlarge.)