Locations:
Search IconSearch
April 21, 2026/Living Healthy/Wellness

Vitamin D and the Sun

Sunlight helps your body produce vitamin D, but be mindful of your sun exposure

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.

How the sun creates vitamin D

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.

Benefits of vitamin D from the sun

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.

Risks of excessive sun exposure

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:

  • Skin damage
  • Premature skin aging
  • Sunburns
  • Skin cancer, including life-threatening melanoma

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.”

Vitamin D and sun safety

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.

Use sunscreen

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.

Keep exposure short

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.

Be strategic

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.

Alternatives to getting vitamin D from the sun

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:

  • Cereal
  • Milk
  • Orange juice
  • Yogurt

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

Cleveland Clinic icon
Health Essentials logo
Subscription icon

Better health starts here

Sign up for our Health Essentials emails for expert guidance on nutrition, fitness, sleep, skin care and more.

Learn more about our editorial process.

Related Articles

Assorted foods high in vitamin D, like salmon, with a vitamin D supplements
November 20, 2025/Nutrition

3 Foods High in Vitamin D

The ‘sunshine vitamin’ is found naturally in some fish and is added to other foods

Hand stirring beverage in a coffee cup, with a supplement bottle and breakfast foods around a

The Best Time of Day To Take Vitamin D

In general, you want to take this ‘sunshine vitamin’ with a meal or snack that contains healthy fats

Vitamin D supplement capsules scattered in the sunlight on a table
May 1, 2025/Orthopaedics

Breaking Down Vitamin D, D2 and D3

Vitamin D is an umbrella term for both D2 and D3 — both help keep your bones and immune system strong

Sources of vitamin D, including foods like fish and dairy, sunshine and supplements
October 25, 2024/Nutrition

What Does Vitamin D Do?

The benefits of vitamin D include stronger bones, a hardier immune system and better overall health

closeup of person holding vitamin d gel capsule between fingers.
October 11, 2023/Heart Health

Vitamin D Supplements: Not a Quick Fix for Heart Disease

Research shows that high doses of vitamin D do nothing to lower your cardiovascular risk

foods with vitamin D and supplements
October 4, 2023/Cancer Care & Prevention

Vitamin D and Breast Cancer: Are They Linked?

If you’ve been diagnosed with breast cancer, having a normal range of vitamin D can help

Healthcare provider checking moles on person's shoulder

Is That Mole Cancerous?

The size, shape and color of moles may offer clues that point to melanoma

Two people wearing sunglasses, laughing and bubble gum blowing
March 25, 2026/Eye Care

Why UV Protection Matters When You’re Choosing Sunglasses

UV protection blocks harmful rays to protect your eyes and the skin around them

Trending Topics

Person walking outdoors, looking at smartphone

What Does It Mean To Be ‘California Sober’?

This ‘harm reduction’ approach to sobriety involves subbing one substance for another — a method that isn’t backed by research

Caregiver applying makeup to smiling teen

Is It OK for Your Kid To Wear Makeup? 5 Things To Consider

Educate your child about body image, expectations and skin care first

Person in long-sleeve swimwear, scratching at their itchy wrist

Is That a Chlorine Rash? What Your Skin Is Telling You

A true chlorine allergy is extremely rare — it’s far more likely that you have a damaged skin barrier

Ad