Can You Get Vitamin D Through a Window?
Understand how vitamin D is produced, why window glass blocks UVB rays needed for vitamin D synthesis, and practical ways to maintain healthy vitamin D levels year-round.

You're resting in the sunbeam in front of a sunny window soaking up the warmth on your skin. Maybe you're working from home, reading a book, or just relaxing. A common question comes up: Is this sun coming through the window giving you vitamin D? Let's cut to the science of this everyday question.
How Does Your Body Actually Produce Vitamin D?
Your body makes vitamin D out of an incredible natural process:
- When your skin is exposed to the sun's ultraviolet B (UVB) rays, it triggers vitamin D production
- These UVB rays interact with a molecule on your skin called 7-dehydrocholesterol
- This interaction converts the molecule into previtamin D3, which then converts to vitamin D3
- Your liver and kidneys then process vitamin D3 into active form, calcitriol
Not all sunlight is created equal when it comes to vitamin D production:
- UVB rays are the specific type needed for vitamin D synthesis
- UVA rays reach deeper into the skin layers but don't contribute to vitamin D production
According to Dr. Emily Harper, Endocrinologist and Vitamin D Research Specialist
Vitamin D synthesis requires direct exposure to UVB rays, which cannot penetrate standard window glass. For optimal vitamin D levels, a combination of safe sun exposure, diet, and supplementation is essential.
The Science Behind Windows and UV Rays
Here's the crucial fact: standard window glass blocks nearly all UVB rays while allowing UVA rays to pass through. This happens because:
- Regular glass effectively blocks wavelengths shorter than 320 nanometers
- UVB rays fall within the 280-315 nanometer range
- UVA rays (315-400 nanometers) largely pass through glass
Different types of glass affect UV transmission in varying ways:
- Standard window glass: Blocks approximately 97% of UVB rays
- Car windshields and windows: Block virtually all UVB rays
- Energy-efficient glass: Blocks even more UVB and some UVA rays
- Tinted glass: Can block nearly all UVB and significant UVA
Can You Get Vitamin D While Sitting Near a Window?
The short answer is: no. You'll get virtually zero vitamin D sitting in a sunny window seat, whether in your house, car, or other enclosed space.
This happens because:
- Glass absorbs 100% of the sun's UVB rays that signal your body to make vitamin D
- The warm feeling and brightness you experience comes from other light wavelengths
- Studies confirm that vitamin D production is negligible through glass
This contradicts the common belief that any bright sunlight, even through windows, helps with vitamin D levels. In reality, you need direct exposure to the sun's rays on your skin without glass in between.
Vitamin D Supplements: A Reliable Alternative
For many people, especially those with limited outdoor access, vitamin D supplements provide an effective solution:
- Supplements offer a consistent source of vitamin D regardless of weather or season
- They're available in various forms (tablets, softgels, gummies, liquids) to suit different preferences
- Vitamin D3 (cholecalciferol) is generally recommended as it's more effective at raising vitamin D levels than vitamin D2
- Most supplements provide between 1,000-5,000 IU (25-125 mcg) per serving
Most healthcare providers agree that supplements are a practical approach to maintaining optimal vitamin D levels when sun exposure is limited. A supplement is an especially good idea if you:
- Live in northern latitudes
- Have limited outdoor time
- Have darker skin (which produces less vitamin D from the same sun exposure)
- Have been advised to avoid unprotected sun exposure
- Live in a smoggy city with limited sun penetration
Always consult with your healthcare provider before starting supplements to determine the appropriate dosage for your specific needs.
Smart Ways to Get Enough Vitamin D
Besides supplements, consider these effective strategies:

Direct Sun Exposure
- Get outdoors between 10AM and 3PM when sunlight is strongest
- Aim for 10-30 minutes of midday sun exposure several times weekly
- Wear short sleeves or shorts when possible to maximize skin exposure
- Allow for 15 minutes of unprotected sun exposure before applying sunscreen
Remember that the strength of the sun changes with season, time of day, and location. It's harder to make vitamin D during winter and in northern latitudes due to the sun's position.
Vitamin D-Rich Foods
While there aren't many foods that naturally contain significant amounts of vitamin D, these sources can help:
- Fatty fish (salmon, mackerel, tuna, sardines)
- Egg yolks
- Mushrooms exposed to UV light
Fortified foods:
- Milk (dairy and plant-based alternatives)
- Orange juice
- Breakfast cereals
Look for vitamin D on the Nutrition Facts label as a percent Daily Value to see how much a serving contributes to your daily needs.
Health Risks of Insufficient Vitamin D
Inadequate vitamin D can lead to serious health concerns:
- Bone health issues: Vitamin D enhances calcium absorption to support strong bones. Without enough, you risk weakened bones and increased fracture risk
- Muscle function problems: Normal muscle function, including contraction and relaxation, relies on adequate vitamin D levels
- Immune system effects: Research shows vitamin D supports normal immune system function
- Potential heart health impacts: Studies suggest a connection between adequate vitamin D and heart health
Relying on window-filtered sunlight rather than direct sun exposure, dietary sources, or supplements significantly increases these deficiency risks.
Practical Tips for Optimizing Your Vitamin D Levels
Follow these actionable strategies:
- Time outdoor activities strategically: Midday sun provides the strongest UVB rays for vitamin D production
- Start gradually: Begin with 5-10 minutes of direct sunlight for fair skin, longer for darker skin tones
- Balanced approach: After your vitamin D "dose," apply sunscreen to prevent skin damage
- Seasonal adjustments: Be more intentional about sun exposure during winter months
- Ongoing testing: Ask your health care provider to check your vitamin D level, especially if you are at risk for deficiency
- Combined strategy: The majority of people require a three-pronged tactic involving some direct sun, vitamin D-dense foods, and supplementation.
The Bottom Line: Windows Block What You Need
Just sitting near a sunny window will not provide you with your vitamin D needs, as glass blocks all of the ultraviolet B rays that stimulate the production of vitamin D. It may be warm and cozy, but all that windowsill tanning is accomplishing is nothing for your vitamin D stores.
Few spend enough time outside to make enough vitamin D, and for others, like in the north, the sun beams are not strong enough to facilitate year-round vitamin D formation.
For optimum vitamin D status, get outside and enjoy direct sun whenever possible, medically supplement, take dietary supplements, and consume foods that contain vitamin D. If you have a question about your vitamin D status or would like to have your level checked, talk with your medical caregiver.
FAQs
References
- 5 Sneaky Ways You’re Being Exposed to the Sun’s UV Rays https://www.skincancer.org/blog/sneaky-ways-youre-being-exposed-to-the-suns-uv-rays/
- Environmental factors that influence the cutaneous production of vitamin D - PubMed https://pubmed.ncbi.nlm.nih.gov/7879731/
- Vitamin D’s Effect on Immune Function - PMC https://pmc.ncbi.nlm.nih.gov/articles/PMC7281985/
- Vitamin D and Cardiovascular Diseases: An Update - PMC https://pmc.ncbi.nlm.nih.gov/articles/PMC10757591/
- Vitamin D - Mayo Clinic https://www.mayoclinic.org/drugs-supplements-vitamin-d/art-20363792