Button Mushrooms and vitamin D
Most people know that sun exposure allows the body to produce vitamin D. Fewer people know that the same concept applies to mushrooms, making them the only vegan source of vitamin D. In fact, the common button mushroom (Agaricus bisporus), when exposed to sunlight after harvest, can produce significant amounts of vitamin D₂-even after being stored in the fridge or bought from the supermarket. The surprising part is that this process can happen in just a few minutes.

Why are mushrooms even capable of producing vitamin D?
Mushrooms contain a substance called ergosterol. Ergosterol is the primary sterol in mushrooms and plays a similar role to cholesterol in animal cells. When ergosterol is exposed to UV-B radiation from the sun, it undergoes a photochemical reaction, turning first into pre-vitamin D₂ and then into vitamin D₂ (ergocalciferol). This is actually very similar to the process that happens in human skin, where UV-B radiation converts 7-dehydrocholesterol into vitamin D₃.
Does the mushroom have to be "alive"?
No.
This is one of the most interesting points. Many assume the process happens because the mushroom stays alive after being picked. In reality, vitamin D production in mushrooms does not depend on an active metabolism. As long as ergosterol is present in the tissue, UV radiation can trigger its conversion into vitamin D₂. That is why even mushrooms that have been harvested, stored, or even dried can still undergo this conversion.
How much vitamin D is in regular button mushrooms?
Commercial button mushrooms are usually grown in dark conditions and therefore naturally contain very little vitamin D. In most cases, the vitamin D content in regular button mushrooms is less than 1 mcg per 100 grams. Because of this, many people do not consider them a source of vitamin D at all.
What happens after sun exposure?
This is where the surprising part comes in.
A study conducted on sliced button mushrooms exposed to direct midday summer sunlight found that:
-
After 15 minutes, they contained about 17.6 mcg of vitamin D₂ per 100 grams.
-
After 60 minutes, they contained about 32.5 mcg of vitamin D₂ per 100 grams.
In other words, in just 15 minutes, you can go from less than one microgram of vitamin D to dozens of micrograms.
How does this compare to the recommended daily intake?
The standard recommendation for most adults is about 15-20 mcg of vitamin D per day (600-800 IU). Therefore, 100 grams of mushrooms exposed to sunlight for about 15 minutes can provide roughly your entire recommended daily intake. Meanwhile, 100 grams of mushrooms exposed to the sun for an hour can provide well over the recommended daily amount.
How do you do this at home?
According to research, the most effective way is to slice the mushrooms, arrange them in a single layer, and expose them to direct sunlight. It is best to choose hours when UV radiation is relatively high (usually around midday).
The reason for slicing them is simple: increasing the surface area exposes more ergosterol to UV radiation, thereby producing more vitamin D. Studies have shown that sliced mushrooms produce more vitamin D than whole mushrooms under the exact same sun exposure.
Does the sunlight have to be direct?
Yes.
UV-B radiation is the main driver behind converting ergosterol into vitamin D₂. Since glass blocks most UV-B rays, placing mushrooms on a windowsill behind a closed window will be significantly less effective. Therefore, it is best to place them outdoors or in a spot where the sun hits them directly.
Is more time always better?
Not necessarily.
Sun exposure studies have found that during the first hour, there is an almost linear increase in vitamin D₂ levels. After that, a plateau effect begins to appear, and during very prolonged exposure, some of the produced vitamin may actually start to break down.
Therefore, from a practical standpoint:
-
15–30 minutes is probably an excellent sweet spot.
-
One hour typically provides a very high amount.
-
Significantly longer exposure times are not necessarily more beneficial.
-
What about vitamin D₂ versus D₃?
The vitamin D found in mushrooms is primarily D₂ (ergocalciferol), whereas in humans and animal-based foods, the most common form is D₃ (cholecalciferol). It was previously claimed that D₃ is far superior, but today it is clear that D₂ is also biologically active and can effectively raise vitamin D levels in the blood. A human clinical trial showed that vitamin D₂ from UV-exposed mushrooms is well-absorbed and increases blood levels of vitamin D. In other words, it is not an "inferior" or inactive form of the vitamin.
What about the ergosterol?
There is an interesting point here: ergosterol itself is a biological molecule with certain antioxidant properties and is being studied in various contexts. When the mushroom is exposed to the sun, some of the ergosterol turns into vitamin D₂. However, this exposure does not convert all the ergosterol present in the mushroom. Therefore, it is not a situation where the mushroom completely "loses" its ergosterol.
Summary
Button mushrooms from the supermarket are usually a very poor source of vitamin D. However, exposing sliced mushrooms to direct sunlight for 15 to 60 minutes can significantly increase their vitamin D₂ content—sometimes to levels that provide the full recommended daily intake in just a 100-gram serving. This process is based on the conversion of ergosterol into vitamin D₂ via UV radiation, and it does not require the mushroom to be alive or attached to its growing medium.