Fasting headaches: why they happen and what helps

Headaches from fasting are common. They are more likely the longer you go without food, and more likely if you already get migraines1. The usual suspects are caffeine withdrawal, too little fluid and the gap without food itself. Most ease once you eat and drink.

What does a fasting headache feel like?

Many people describe a dull, steady ache, often across the forehead, that builds slowly during the fast. It is often mild to moderate. A sudden, severe or unusual headache is something else and needs medical attention (see the end of this page).

What causes headaches when fasting?

Researchers haven’t settled on a single cause. Several things probably work together, and they differ from person to person.

Caffeine withdrawal

This is the easiest cause to fix. If you drink coffee or tea every day and then skip it, a headache can follow within a day. In a study of people on the first day of a fast, caffeine withdrawal headaches were common among regular coffee drinkers2.

People often change their coffee habit when they start fasting. They skip the morning latte because milk breaks the fast, and they don’t replace it with anything. The headache that follows gets blamed on fasting.

Too little fluid

Not drinking enough can cause a headache whether you fast or not. During a fast you also miss the water that normally comes with food, so it is easy to fall short without noticing.

The gap without food

Going a long time without eating can bring on a headache in some people, even with enough water and caffeine. Low blood sugar is one explanation that has been suggested. What reviews do report is a link with fast length: the longer the fast, the more likely the headache1.

How do you get rid of a fasting headache?

Start with the simple steps:

  1. Drink water. Have a large glass, then keep sipping. See what to drink while fasting for how much you need in a day.
  2. Have your usual caffeine. Plain black coffee or tea doesn’t break a fast. The page on black coffee and fasting explains why.
  3. Eat. If the headache is strong or getting worse, end the fast. No fast is worth a day of pain.

About pain relievers: some are meant to be taken with food. Check the label or ask a pharmacist before you take one on an empty stomach.

How to prevent headaches on fasting days

  • Keep caffeine steady. Drink your normal amount, just without milk and sugar. If you want to cut down, do it slowly over a week or two, and not in the week you start fasting.
  • Drink through the day. Begin with a glass of water when you wake up.
  • Shorten the fast. Since headaches are more likely with longer fasts1, a 12 or 14 hour fast may be free of them when 18 hours is not.
  • Eat a proper last meal. A balanced meal with protein and vegetables before the fast is better than a small snack.
  • Protect your sleep. Keep regular hours, and don’t cut sleep short to fit a schedule.

Not sure whether it is the coffee or the fast? The post on coffee withdrawal or fasting headache shows how to tell them apart.

Do fasting headaches go away?

For many people, yes. Headaches in the first days of a new schedule often fade as the routine settles, especially once caffeine and water are sorted out. It is not guaranteed. If headaches still come on most fasting days after two or three weeks, the schedule is probably too long for you.

Other early symptoms follow a similar pattern. They are covered in the guide to intermittent fasting side effects.

Fasting if you get migraines

Take extra care. People who get migraines are more likely to get headaches from fasting1, and for many of them a skipped meal is a known trigger.

Talk to your doctor before you try a fasting schedule. If you go ahead, keep the fast short, keep meal times regular and stop if your migraines become more frequent. Fasting is optional, and regular meals may simply suit you better. See who should not fast for other groups who need a doctor’s advice first.

When is a headache a warning sign?

Eat and end the fast if a headache comes with dizziness, shaking, sweating or confusion. If you take insulin or other blood sugar lowering medicine, these can be signs of low blood sugar, and you should not be fasting without your doctor’s advice.

Get urgent medical help for:

  • a sudden, severe headache, or the worst headache you have had
  • a headache with fever and a stiff neck
  • a headache with weakness, numbness, trouble speaking or changes in vision
  • a headache after a blow to the head

These are not fasting headaches, and food will not fix them.

See a doctor, without urgency, if headaches keep returning, last long after you have eaten, or are new for you and don’t have a clear reason.

Questions people ask

How long does a fasting headache last?

It usually eases after you eat and drink, though it can take a few hours to clear fully. A headache that keeps going long after a meal, or returns every day, is worth discussing with a doctor.

Can I take ibuprofen while fasting?

A pain reliever has no meaningful calories, but some, such as ibuprofen, are best taken with food because they can irritate the stomach. Read the label or ask a pharmacist. If the medicine needs food, end your fast and eat.

Sources

  1. Torelli P, Manzoni GC (2009). Fasting headache: a review of the literature and new hypotheses. Headache.
  2. Magdy R, et al. (2023). Prevalence, characteristics, and factors associated with caffeine-withdrawal headache during the first day of Ramadan fasting. Headache.

Written with AI help and checked against the sources above. Every cited study is linked so you can read it yourself. This page is general information, not medical advice. How we write and check articles.