If your urine smells like coffee, it may simply be a sign that you’ve consumed a lot of coffee. If the smell remains after cutting back, talk with a healthcare professional.

Urine is your body’s way of filtering out waste products from your blood through the kidneys. This waste is what gives urine its distinctive smell and odor. Eating and drinking certain things, including coffee, can change the smell of your urine.

The main cause of urine that smells like coffee is simply drinking too much coffee. Coffee contains several beneficial compounds, including polyphenols such as hydroxycinnamic acids, that give it its signature smell and health benefits. When these compounds are broken down in your body, they become waste products called metabolites, some of which are released in your urine. Metabolites from the compounds in coffee may cause your urine to smell like coffee.

Coffee also has caffeine, which is considered to be a weak diuretic. This means that caffeine could make you urinate more, which can make drinking large amounts of caffeine dehydrating in some people. When you become dehydrated, your urine becomes more concentrated, which can make the smell of metabolites more noticeable.

To avoid excessive urination and other negative health effects, the Mayo Clinic recommends limiting yourself to 400 milligrams of caffeine a day. That’s equal to about four cups of brewed coffee. If you drink more than that, make sure you drink extra water to stay hydrated.

Smelly urine can have other causes as well, so if you aren’t sure what exactly the smell is, contact your doctor. For example, sweet-smelling urine can be a sign of diabetes mellitus.

While urine that smells like coffee is often harmless, it’s usually a sign that you’re consuming too much caffeine. In addition to being dehydrating in large amounts, caffeine enhances the effect of dopamine and also reduces the effect of adenosine. This can make you sleepy at the end of the day, as caffeine blocks adenosine by binding to adenosine’s receptors.

Being a stimulant, caffeine can make it hard to fall asleep. You can help to avoid this by not drinking coffee within six hours before you go to bed.

Drinking too much caffeine can produce other symptoms as well, including:

  • restlessness
  • rapid heart rate
  • anxiety
  • headaches
  • agitation
  • excitement
  • nausea

It’s also possible to overdose on caffeine. Seek immediate medical treatment if you experience any of the following symptoms after drinking coffee or other caffeinated beverages:

  • vomiting
  • hallucinations
  • chest pain
  • confusion
  • convulsions

Drinking less coffee is an easy way to prevent your urine from smelling like coffee, but that isn’t always easy, thanks to caffeine’s addictive properties. Switching to green or black teas may also help, since they contain less caffeine than brewed coffee does. When you drink coffee, make sure to drink plenty of water as well. You can also try diluting your usual serving of coffee with extra water.

Whether you stick with coffee or switch to tea, try waiting at least 30 to 60 minutes between when you wake up and when you have your first caffeinated drink. Your body naturally releases a hormone called cortisol during this time, which is thought to help wake you up. You may find that you need less caffeine when you let this process happen first.

Having urine that smells like coffee can be alarming at first, but it usually just means you’ve had too much coffee. Try to cut back on your daily coffee intake, and drink more water. If your urine continues to have an unusual smell, talk to your doctor.