rethinkMushrooms Search
Menu
Guide

How to Get Vitamin D from Mushrooms Using Sunlight

Gills-up in midday sun can generate 400+ IU vitamin D2 per 100g. The research behind this trick — why gills, which species, optimal timing, and storage.

Mushroom Nutrition & Cooking

46,000 IU per 100g

Shiitake mushrooms sun-dried gills-up for two days can yield up to 46,000 IU of vitamin D2 per 100g — compared to roughly 100 IU in untreated mushrooms.

Jiang et al., Trends in Food Science & Technology, 2020

~2x

more ergosterol in mushroom gills than the cap surface — plus several-fold faster vitamin D2 conversion under UV, the basis for gills-up positioning (tissue-distribution studies)

491 μg/100g

vitamin D2 achieved in UV-treated button mushrooms vs. ~2 μg baseline (Koyyalamudi 2009)

280–315nm

UVB wavelength range required for ergosterol-to-vitamin-D2 conversion (Keegan 2013)

Jiang et al., Trends in Food Science & Technology, 2020

How to Get Vitamin D from Mushrooms Using SunlightView as image ↗

You have probably heard the advice: put your mushrooms gill-side up in sunlight to boost their vitamin D. What you may not know is why this works, how dramatic the effect can be, or how to optimize it based on actual measurements.

The short answer is that mushrooms produce vitamin D from sunlight through a photochemical reaction that mirrors the one in human skin. The long answer involves understanding why gills specifically hold roughly twice as much of the relevant precursor compound as the cap surface, why midday sun matters more than morning light, and why shiitake mushrooms sun-dried for two days can accumulate up to 46,000 IU of vitamin D2 per 100 grams.[2]

This is also one of the few food-based vitamin D strategies with human data showing it actually raises serum vitamin D levels in people: ingesting 2,000 IU of vitamin D2 from UV-exposed mushrooms was as effective as a 2,000 IU D2 or D3 supplement at raising blood 25-hydroxyvitamin D.[1] For the broader nutritional context, mushroom nutrition facts covers the full vitamin and mineral picture by species.

Key Takeaways

  • Mushroom gills contain roughly twice the ergosterol (the vitamin D precursor) of the cap surface — about 10.6 vs. 5.3 mg/g dry weight in shiitake — and convert to vitamin D2 several-fold faster under UV, which is why gills-up orientation matters (tissue-distribution studies)
  • Sun-dried shiitake exposed gills-up for 2 days (approximately 6 hours/day) can reach 46,000 IU vitamin D2 per 100g — compared to roughly 100 IU in untreated shiitake (Jiang 2020)
  • UV-treated button mushrooms reached 491 μg/100g (approximately 19,640 IU) vitamin D2 from a baseline near 2 μg, and the D2 formed is well absorbed in bioavailability testing (Koyyalamudi 2009); in humans, 2,000 IU of mushroom-derived D2 raised blood 25-hydroxyvitamin D as effectively as a supplement (Keegan 2013)
  • The required UV wavelength is UVB at 280–315nm, which is blocked by window glass and weakest at low sun angles (early morning, late afternoon, and winter months at higher latitudes)
  • Vitamin D2 formed in mushrooms is stable and persists in dried mushrooms stored at room temperature — the boost lasts through cooking and storage
  • The reaction is confirmed by a direct chemical trade-off: UV exposure simultaneously increases vitamin D2 and decreases ergosterol in mushroom tissue, proving the conversion (Hu 2020)

Why Gills-Up Is Not Just Folk Wisdom: The Ergosterol Difference

The "gills-up" advice circulates in cooking blogs and wellness content as though it is a kitchen tip passed down through generations. It is actually well-supported by photobiology research.[1] The vitamin D precursor in mushrooms is ergosterol — not the 7-dehydrocholesterol (7-DHC) that human skin uses — and it is not evenly distributed through the mushroom. Studies measuring ergosterol across mushroom tissues find the gills are the richest: in shiitake, gill tissue holds roughly 10.6 mg per gram dry weight versus about 5.3 mg/g in the cap, so the gills carry on the order of twice the precursor of the outer surface. Just as important, when the gills rather than the cap face the UV source, the conversion of ergosterol to vitamin D2 runs several times faster.

Ergosterol by Mushroom Tissue

Gills Hold Roughly Twice the Vitamin D Precursor of the Cap

Ergosterol — the compound UV light converts to vitamin D2 — is not spread evenly through a mushroom. In shiitake, gill tissue carries about 10.6 mg/g dry weight, versus roughly 5.3 mg/g in the cap and 3.0 mg/g in the stalk. Because the gills are both richest in precursor and convert several-fold faster under UV, facing them toward the sun is what makes the “gills-up” technique work.

Gills (lamellae)

10.6 mg/g

Cap (pileus)

5.3 mg/g

Stalk (stipe)

3.0 mg/g

Why it matters: The gills-up advice is not folklore — it follows from where the precursor lives. Ergosterol (the fungal provitamin) is the starting material; it is not the 7-dehydrocholesterol human skin uses. Orienting the gills toward direct outdoor sun exposes the most precursor-rich, fastest-converting tissue to UVB.

Source: mushroom tissue-distribution measurements (Food Chemistry; Yuan JP et al. 2008, Appl Microbiol Biotechnol). Values are dry-weight ergosterol concentrations in shiitake; exact figures vary by species and growing conditions.

Gills are the metabolically active, spore-producing structures of the mushroom. They are dense with fungal cellular material and proportionally richer in sterols, including ergosterol, which is a membrane lipid essential to fungal cell structure. More ergosterol means more substrate for the photochemical conversion.

When cap-side up, the sun hits the dense, low-ergosterol outer surface. When gill-side up, it hits the porous, high-ergosterol interior structures. The difference in outcome is not marginal. This is why gills-up orientation is a documented technique, not anecdote.

The Photochemical Conversion: What UV Light Actually Does

Understanding why sunlight works requires knowing what it does chemically. Ergosterol in fungal cell membranes absorbs UV photons in the UVB range (280–315nm). This causes a photochemical ring-opening reaction that converts ergosterol to pre-vitamin D2, which then undergoes thermal isomerization to vitamin D2 (ergocalciferol). The process is chemically analogous to what human skin does with 7-dehydrocholesterol to produce vitamin D3.

Hu and colleagues provided direct proof of this conversion in 2020 by measuring both vitamin D2 and ergosterol content in shiitake and oyster mushroom powder before and after UV irradiation.[3] UV exposure simultaneously increased D2 content and decreased ergosterol content, confirming that the ergosterol was being consumed in the conversion rather than both compounds increasing independently. You are literally draining the mushroom's ergosterol reserves to build vitamin D2.

This trade-off is relevant for supplement manufacturers who UV-treat dried mushroom powder: excessive UV exposure will eventually deplete the ergosterol pool and plateau the vitamin D2 output. For home cooks, this limit is academic, since the ergosterol in a serving of mushrooms far exceeds what can be converted in a reasonable sun-exposure window.

The UVB wavelength requirement has one practical implication most advice omits: glass blocks UVB entirely. A mushroom sitting on a windowsill in indirect sunlight generates almost no vitamin D. The glass filters out the 280–315nm photons that drive most of the conversion, leaving mainly visible light and some UVA — far less effective at forming vitamin D2 in intact mushrooms under sunlight. The mushrooms must be outdoors in direct sunlight.

The Dramatic Case: What Two Days of Sun Does to Shiitake

The most extreme documented example of sunlight-induced vitamin D production in mushrooms comes from shiitake. Jiang and colleagues' 2020 review in Trends in Food Science & Technology synthesized the evidence on how drying conditions affect this conversion, comparing sun-drying with UV exposure against oven drying (heat, no UV) and freeze-drying (neither).[2]

Shiitake mushrooms sun-dried gills-up for two days, with approximately six hours of sun exposure per day, accumulated up to 46,000 IU of vitamin D2 per 100 grams of dry weight. The baseline vitamin D2 content in untreated shiitake is roughly 100 IU/100g. That is a 460-fold increase from the same starting material.

Oven-dried shiitake, receiving comparable heat without UV, showed no meaningful vitamin D2 increase — evidence that the UV photons are the active ingredient, not the drying process or the heat itself. Temperature does not drive this reaction.

These numbers are for dried mushrooms, which is important context. When shiitake are fresh rather than dried, the IU-per-100g figure reflects water content in the denominator: fresh mushrooms are roughly 90% water, so the equivalent vitamin D2 per 100g of fresh mushrooms is lower. The drying process concentrates the vitamin D2 as water is removed, but also makes the mushrooms shelf-stable, which is the practical advantage.

For species-specific data on maximizing shiitake vitamin D content, the article on shiitake and UV-B exposure covers this in detail.

Button Mushrooms: The Most Accessible Species

Most people working with this technique will use whatever mushrooms are available at a grocery store, which is usually white button or cremini. Koyyalamudi and colleagues measured vitamin D2 formation in UV-irradiated Agaricus bisporus (button mushrooms) and then tested whether the resulting D2 is absorbed, using an animal (rat) bioavailability model.[4]

The measured vitamin D2 content in UV-treated button mushrooms reached 491 μg per 100g dry weight, compared to roughly 2 μg per 100g in untreated mushrooms. The bioavailability portion of the study showed the D2 formed by UV treatment is well absorbed — it is genuinely bioavailable, not just present on paper. That the same holds in people comes from separate human work: ingesting 2,000 IU of vitamin D2 from mushrooms raised blood 25-hydroxyvitamin D as effectively as a 2,000 IU D2 or D3 supplement.[1]

Button mushrooms respond to UV treatment more slowly than shiitake because they have lower baseline ergosterol content. The practical implication is that a shorter sun-exposure window generates proportionally less vitamin D2 in button mushrooms than in shiitake. Even so, meaningful generation is achievable.

For the UV-treated button mushroom varieties already sold in grocery stores (labeled "UV-treated" or sometimes showing an explicit IU content on the package), the article on button mushrooms and vitamin D covers the commercial product data.

How to Sun-Treat Mushrooms at Home: A Practical Guide

Step 1: Place gill-side up

Set mushrooms on a clean tray or cutting board with gills facing upward. For portabella caps, this means the standard underside-up position. For whole smaller mushrooms (shiitake, button), slice them in half or flatten them so the gills are exposed upward. This positioning exposes the highest-ergosterol tissue directly to the sun.

Step 2: Choose the right time of day

UV intensity is highest between 10am and 2pm solar time, when the sun is at its highest angle and UVB travels through the least amount of atmosphere. Early morning and late afternoon sunlight is predominantly UVA and visible, which does not drive the conversion. A UV index of 3 or above is the practical threshold at which meaningful conversion occurs.

At higher latitudes (above approximately 40°N or 40°S), UVB intensity in winter months may be insufficient for meaningful conversion even at midday. The same latitude limitation applies to human skin vitamin D synthesis.

Step 3: Duration by species and goal

  • Button mushrooms: 20–30 minutes of midday summer sun generates a meaningful but modest increase in D2 content. Extending to 60 minutes increases output further; diminishing returns set in beyond 2 hours.
  • Portabella caps: Similar response to button but the larger gill surface area captures more UV per cap.
  • Shiitake: More responsive due to higher baseline ergosterol. 1–2 hours per day for 1–2 days produces substantial accumulation. For the extreme 46,000 IU/100g figure, 2 days of full midday exposure over the full day is required (Jiang 2020).

Step 4: Store properly

Vitamin D2 formed in mushrooms persists through drying and room-temperature storage. Dried sun-treated mushrooms retain their vitamin D2 content for months without significant degradation, making large batches practical. Cooking also preserves the vitamin D2 substantially, since it is fat-soluble and heat-stable at cooking temperatures.

Step 5: Fresh mushrooms also work

The technique applies to fresh mushrooms you will cook immediately. You do not need to dry them first. Set fresh mushrooms gills-up in midday sun for 15–30 minutes before cooking. The generated D2 is retained during typical cooking methods.

A Critical Limitation: Window Glass Blocks the UV That Makes This Work

The most common failure mode for this technique is placing mushrooms in a sunny window. Window glass blocks virtually all UVB radiation. A mushroom in a south-facing sunny window receives plenty of visible light and warmth but almost no vitamin D2-generating UV.

The mushrooms must be placed in direct outdoor sunlight. A balcony, doorstep, or garden table in direct sun on a clear day provides the correct UV spectrum. Overcast conditions reduce UVB significantly; partly cloudy conditions reduce it moderately but still allow some conversion.

Fact Check

Does a sunny windowsill work?

The claim

“Put mushrooms on a sunny windowsill and they will make vitamin D.”

Reasonable-sounding advice — the spot is bright and warm all afternoon.

What research shows

Misleading

Ordinary window glass blocks virtually all UVB (280–315nm), the exact band that converts ergosterol to vitamin D2. A mushroom behind glass gets plenty of light and warmth but almost none of the photons that drive the reaction.

The mushrooms must sit in direct outdoor sun — a balcony, doorstep, or garden table on a clear day. This is the same reason you cannot meaningfully build your own vitamin D sitting behind a window.

Mushroom photobiology; UVB is blocked by standard window glass

This limitation explains why sun-treated mushrooms are not simply an all-season solution. In winter at higher latitudes, outdoor UV intensity may be insufficient, and the technique is most effective from late spring through early autumn.

Does Cooking Destroy the Vitamin D?

A practical concern is whether the vitamin D2 generated by sun exposure survives cooking. Vitamin D2 is fat-soluble and thermally stable at typical cooking temperatures (150–220°C). Studies tracking D2 content through cooking consistently find that the majority of vitamin D2 is retained, with losses typically in the 10–30% range depending on cooking method. Boiling in water shows slightly higher losses than dry-heat methods like roasting or sautéing, because some D2 may leach into the water. For fried preparations, fat-soluble vitamin D2 is preserved well.

The practical conclusion is that cooking does not undo the UV treatment. Sautéed or roasted sun-treated mushrooms deliver a meaningful fraction of the vitamin D2 that was generated.

Safety

Low

This is food guidance, not a deficiency treatment

Concern

Sun-treated mushrooms are a genuine dietary source of vitamin D2, but yields vary widely with species, sun angle, latitude, season, and exposure time — so a home batch is not a reliable substitute for a diagnosed deficiency protocol.

What the research says

Use sun-treated mushrooms as one part of a varied diet. If you suspect vitamin D deficiency, a blood 25-hydroxyvitamin D test and clinician-guided dosing remain the dependable path. Vitamin D is fat-soluble and has an upper intake limit, so do not treat 'more sun-exposed mushrooms' as risk-free megadosing.

Particularly relevant for: Anyone using this technique to address suspected low vitamin D, pregnant or nursing people, and those on vitamin D or calcium therapy

What to do

Confirm status with a 25(OH)D test before relying on any single food strategy; discuss target intake with a clinician.

General vitamin D safety guidance; this article is educational and not medical advice

The Bottom Line

The science behind sunlight-boosted mushroom vitamin D is specific and reproducible: gills hold roughly twice the ergosterol precursor of the cap surface and convert several-fold faster under UV, placing gills upward in outdoor midday sun converts ergosterol to vitamin D2 via a UVB photochemical reaction (280–315nm), and the output can range from a few hundred IU for a brief button mushroom exposure to as much as 46,000 IU/100g for shiitake sun-dried for two days (Jiang 2020). Window glass blocks the required UVB, so indoor sunlight does not work. The vitamin D2 generated is bioavailable and survives typical cooking.

Frequently Asked Questions

Sources & References

  1. 1RTHM-00292·Keegan, Raphael-John H et al. (2013). “Photobiology of vitamin D in mushrooms and its bioavailability in humans..” Dermato-endocrinology.Study breakdown →PubMed →↩
  2. 2RTHM-00623·Jiang, Qiyong et al. (2020). “UV induced conversion during drying of ergosterol to vitamin D in various mushrooms: Effect of different drying conditions..” Trends in food science & technology.Study breakdown →PubMed →↩
  3. 3RTHM-00621·Hu, Daihua et al. (2020). “Ultraviolet Irradiation Increased the Concentration of Vitamin D2 and Decreased the Concentration of Ergosterol in Shiitake Mushroom (Lentinus edodes) and Oyster Mushroom (Pleurotus ostreatus) Powder in Ethanol Suspension..” ACS omega.Study breakdown →PubMed →↩
  4. 4RTHM-00159·Koyyalamudi, Sundar Rao et al. (2009). “Vitamin D2 formation and bioavailability from Agaricus bisporus button mushrooms treated with ultraviolet irradiation..” Journal of agricultural and food chemistry.Study breakdown →PubMed →↩