Sunlight helps your body produce vitamin D, but be mindful of your sun exposure
Image content: This image is available to view online.
View image online (https://assets.clevelandclinic.org/transform/01ed36a0-b495-4bfb-bec5-9f6f88ec0553/applyielderly-couple-walks-sunny-day-1912009851)
Older couple walking outside in a sunny park
Vitamin D has something special going for it.
Advertisement
Cleveland Clinic is a non-profit academic medical center. Advertising on our site helps support our mission. We do not endorse non-Cleveland Clinic products or services. Policy
You get most of the vitamins your body needs from foods you eat. And you can get a good helping of vitamin D from certain foods. But it’s not the most common way to get it.
“More than 90% of our vitamin D comes from sunlight,” says family medicine physician Charles Garven, MD. (Hence its nickname, the sunshine vitamin.)
But this isn’t a “more is better” situation.
Yes, you need vitamin D. And, yes, some time spent outside enjoying a beautiful day is good for you. But it doesn’t take hours of baking on the beach to get your vitamin D. And excessive time in the sun can bring on its own problems.
Where’s the line? Dr. Garven shares advice.
Your skin makes vitamin D when it’s exposed to sunlight. From there, your body processes and uses it.
“When sunlight hits your skin, it triggers a chemical reaction that converts inactive forms of vitamin D into the active form your body can use — namely, vitamin D3,” Dr. Garven explains.
This process depends specifically on ultraviolet B (UVB) rays. The trouble is, UV (ultraviolet) rays are also responsible for sunburns and other skin damage. More on that in a bit.
Vitamin D is an essential nutrient. It’s an important player in boosting your immune system, supporting muscle function and encouraging heart health.
Advertisement
But it’s perhaps best known for its power to boost your bone health. That’s because vitamin D helps your body absorb and use calcium, which is essential for strong bones.
“Over time, low vitamin D levels can contribute to weaker bones and a higher risk of fractures,” Dr. Garven reports. “So, we focus a lot on vitamin D to improve bone density and prevent osteoporosis.”
Vitamin D also has a reputation for being a mood enhancer. But there may be more to that than meets the eye.
It’s true that the vitamin itself may help regulate your emotional well-being. But Dr. Garven points out that time spent outdoors also encourages other healthy habits, like being physically active, socializing and reflecting in nature — all of which can have mood-boosting effects, too.
Here’s where things get tricky. Sunlight is essential for vitamin D production, but too much sun exposure is a real risk.
Too much time spent in the sun without proper protection increases your risk of:
The risks of too much sun are why Dr. Garven emphasizes moderation — and absolutely avoiding tanning beds.
“Tanning bed lights use a higher concentration of UVA and much lower UVB,” he warns. “You get no vitamin D benefit from them — only risk.”
The sweet spot is finding the balance between getting enough sunlight for vitamin D production while also protecting your skin from sun damage.
Dr. Garven recommends following these tips.
Some people worry that using sunscreen cancels out vitamin D production — but that’s not the case.
“Sunscreen doesn’t block vitamin D conversion,” Dr. Garven confirms. “It blocks the sun’s damaging effects.”
Sunscreen lowers how much UV radiation reaches your skin. That helps protect you from the risks of sun damage. But it doesn’t block UV light completely. So, your body can still make vitamin D, especially if you’re outdoors for more than a few minutes.
Wearing sunscreen means you benefit from the best of both worlds: You’ll still get your vitamin D, but with less risk.
If you plan to be outside for more than a short period of time, use a broad-spectrum sunscreen with SPF 30 or higher, and reapply it as directed. For best protection, use sunscreen every day.
When it comes to vitamin D from the sun, more time outside isn’t necessarily better.
For most people, just 10 to 30 minutes of direct sunlight is enough to support vitamin D production. After that point, Dr. Garven says, “The risks start to outweigh any additional benefits.”
Advertisement
Longer exposure doesn’t mean your body keeps making more vitamin D indefinitely. Instead, what you’re accumulating is damage to your skin, especially if you’re exposed day after day without protection.
That’s why brief, regular exposure — rather than prolonged sunbathing — is the safer approach.
Spending time outdoors is important for your physical and mental well-being. And Dr. Garven encourages you not to lose sight of that.
“Getting outside, being active, doing things that aren’t sitting and scrolling — those things have benefits beyond vitamin D alone,” he encourages.
But it pays to be thoughtful about how and when you get your fill of sunshine. On high‑UV days, in particular, consider:
The goal isn’t to avoid the sun. It’s to work with it — getting what your body needs while protecting your skin for the long term.
Sunlight is the primary source of vitamin D, but it’s not the only one.
You can get vitamin D from some foods, too. Good sources include cod liver oil, rainbow trout and sockeye salmon. Several common foods are also fortified with vitamin D, including:
Advertisement
Supplements may also be an option.
“For the majority of folks, vitamin D supplements are generally safe,” Dr. Garven says. “But they’re not right for everyone, especially if you have kidney disease. It’s always best to talk with a healthcare provider before starting any kind of supplement.”
What’s more, taking supplements shouldn’t be a replacement for enjoying safe fun in the sun.
“Being outside and staying active has benefits beyond vitamin D,” he reiterates.
The key is balance — get some sun, protect your skin and talk to a healthcare provider if you’re concerned about your vitamin D levels.
Advertisement
Sign up for our Health Essentials emails for expert guidance on nutrition, fitness, sleep, skin care and more.
Learn more about our editorial process.
Advertisement
The ‘sunshine vitamin’ is found naturally in some fish and is added to other foods
In general, you want to take this ‘sunshine vitamin’ with a meal or snack that contains healthy fats
Vitamin D is an umbrella term for both D2 and D3 — both help keep your bones and immune system strong
The benefits of vitamin D include stronger bones, a hardier immune system and better overall health
Research shows that high doses of vitamin D do nothing to lower your cardiovascular risk
If you’ve been diagnosed with breast cancer, having a normal range of vitamin D can help
The size, shape and color of moles may offer clues that point to melanoma
UV protection blocks harmful rays to protect your eyes and the skin around them
This ‘harm reduction’ approach to sobriety involves subbing one substance for another — a method that isn’t backed by research
Educate your child about body image, expectations and skin care first
A true chlorine allergy is extremely rare — it’s far more likely that you have a damaged skin barrier