A rotten-egg smell in your urine almost always traces back to sulfur-containing compounds, most commonly hydrogen sulfide or its chemical relatives. Your body processes sulfur from food, medications, and its own metabolic pathways, and some of those byproducts end up in urine. In most cases the cause is harmless and temporary, but certain infections, metabolic disorders, and structural problems in the urinary or digestive tract can also produce that unmistakable odor.
Why Sulfur Compounds Smell the Way They Do
Hydrogen sulfide is the signature molecule behind the rotten-egg smell. Even at very low concentrations, the human nose can detect it, which is why the odor seems so dramatic even when only trace amounts are present. Your body produces small quantities of hydrogen sulfide as part of normal metabolism, particularly when breaking down sulfur-containing amino acids like cysteine and methionine. These amino acids are found in virtually every protein you eat, so some level of sulfur in your urine is completely normal. The smell becomes noticeable when the concentration tips above your nose’s detection threshold, and several everyday situations can push it there.
Food and Drink as the Most Common Trigger
The foods most likely to give your urine a sulfurous odor are the ones rich in sulfur compounds or sulfur-containing amino acids. Asparagus is the most well-known culprit. It contains asparagusic acid, which your body breaks down into several sulfur-bearing metabolites that are excreted in urine, sometimes within 15 to 30 minutes of eating it. Garlic, onions, and cruciferous vegetables like broccoli, cabbage, and Brussels sprouts are also heavy sulfur contributors. Eggs, red meat, and other high-protein foods deliver large doses of methionine and cysteine, and ramping up your protein intake can noticeably change urine odor.
Alcohol, particularly beer, can also intensify the smell. Beer contains sulfites and is a diuretic, and the combination of sulfur compounds plus the metabolic byproducts of alcohol breakdown can leave urine smelling off for hours. Coffee similarly changes urine odor for many people, though the mechanism is slightly different and relates to the complex mixture of volatile organic compounds it introduces into the bloodstream.
The reassuring part about food-driven odor changes is that they are self-limiting. Once the food clears your system, usually within a day, the smell goes away on its own.
Dehydration Concentrates the Smell
When you are not drinking enough water, your kidneys conserve fluid by producing less urine at a higher concentration. That concentrated urine contains the same sulfur metabolites in a smaller volume of liquid, which amplifies the odor. Research on urine-derived odorous compounds confirms that diluted urine emits fewer odorous compounds because the concentrations of odorant precursors drop.1Journal of Environmental Sciences. Determination of urine-derived odorous compounds in a source separation sanitation system This is one of the simplest explanations for a sudden sulfur smell: you may just need to drink more water. Dark yellow or amber-colored urine alongside the odor is a strong hint that dehydration is the issue.
Certain situations make dehydration more likely without you realizing it. Hot weather, vigorous exercise, high caffeine intake, and even sleeping through the night without hydrating can all concentrate your urine enough to make the smell noticeable first thing in the morning. Morning urine is almost always more concentrated and more odorous than urine later in the day, and that alone accounts for a large share of the “why does my pee smell weird?” questions people search for.
Urinary Tract Infections and Bacterial Hydrogen Sulfide
Bacteria are efficient producers of hydrogen sulfide. When an infection takes hold in the urinary tract, the bacteria metabolize sulfur-containing compounds in urine and release hydrogen sulfide as a byproduct. This is one reason foul-smelling urine is a classic symptom of urinary tract infections. The smell from an infection tends to be stronger and more persistent than what you get from food, and it usually comes with other symptoms like a burning sensation during urination, frequent urges to urinate, cloudy or discolored urine, and sometimes lower abdominal pain or fever.
Some bacterial species produce especially pungent urine. A case report documented the first proven instance of Aerococcus urinae causing recurrent, socially disabling malodorous urine in an adult, illustrating that specific organisms can drive odor that goes well beyond the typical unpleasantness of a common UTI.2PubMed Central. Foul smelling urine in an adult caused by Aerococcus urinae Standard urine cultures sometimes miss less common pathogens, so if foul-smelling urine keeps recurring despite negative cultures, asking a doctor about extended or specialized cultures can be worthwhile.
In people with indwelling urinary catheters, bacteria-derived hydrogen sulfide plays an additional role. Research has shown that bacterial hydrogen sulfide contributes to the formation of antibiotic-resistant persister cells and biofilms on catheter surfaces, making catheter-associated urinary tract infections harder to treat and more likely to produce persistent odor.3PubMed. Trash into Treasure: Nano-coating of Catheter Utilizes Urine to Deprive H(2)S Against Persister and Rip Biofilm Matrix If you or a family member uses a catheter and notices a rotten-egg smell, that warrants prompt medical attention because it can signal an active infection that is already establishing itself on the device.
Medications and Supplements
Several medications and dietary supplements can change the sulfur content of your urine. Sulfonamide antibiotics, as their name suggests, contain sulfur and can alter urine odor during treatment. Diabetes medications in the sulfonylurea class are another source. Even common over-the-counter supplements like alpha-lipoic acid, N-acetyl cysteine, and high-dose B vitamins can shift urine odor toward something sulfurous.
Glucosamine and chondroitin supplements, widely used for joint health, contain sulfate groups that contribute to urinary sulfur output. If you recently started a new supplement and noticed the smell, checking the ingredient list for sulfur-containing compounds is a reasonable first step. The odor usually fades once you stop taking the supplement or once your body adjusts to it.
Genetic and Metabolic Conditions
A handful of inherited metabolic disorders directly affect how your body handles sulfur-containing amino acids, and these can produce chronically sulfurous-smelling urine. Genetic defects in the enzymes that regulate sulfur metabolism produce a variety of conditions including homocystinuria, cystinuria, and related disorders.4PubMed Central. Sulfur containing amino acids and human disease
Cystinuria is among the most relevant of these. It is a genetic disorder in which the kidneys fail to properly reabsorb the amino acid cystine, allowing it to accumulate in the urine. The excess cystine can crystallize and form kidney stones, and the sulfur-rich cystine itself can make urine smell distinctly of rotten eggs. Cystinuria is the most common type of single-gene stone disease, accounting for roughly 6 to 8 percent of kidney stones in children, and it carries a high risk of chronic kidney disease because of recurrent stone episodes.5PubMed Central. Cystinuria: An Overview of Diagnosis and Medical Management Adults can have cystinuria too, though it is often diagnosed in childhood or adolescence when the first stones appear.
Methionine malabsorption syndrome, sometimes called “oast house urine disease,” is much rarer but produces a distinctly sulfurous smell. In this condition the body cannot properly absorb methionine from the gut, and bacterial fermentation of the unabsorbed amino acid generates sulfur gases that make their way into the urine. These conditions are uncommon enough that they would not be the first explanation to investigate, but if sulfurous urine persists for weeks without an obvious dietary or infection-related cause, metabolic screening can help rule them out.
Kidney Stones and Bacterial Breakdown of Urea
Certain types of kidney stones are themselves the product of bacterial sulfur chemistry, and their formation can change how your urine smells. Urease-producing bacteria like Proteus, Klebsiella, and Pseudomonas break down urea into ammonia and carbon dioxide, which alkalinizes the urine and promotes the crystallization of struvite stones (magnesium ammonium phosphate).6Frontiers in Cellular and Infection Microbiology. How is the human microbiome linked to kidney stones? The bacterial metabolism that drives this process also releases various sulfur compounds, and people with struvite or infection-related stones often report that their urine smells particularly foul.
Cystine stones, produced by cystinuria as described above, are a separate category entirely. They form not because of bacterial action but because of the genetic overexcretion of cystine. But both types of stones share an important practical consequence: they tend to recur, and the recurring infections or metabolic imbalances that come with them can produce chronic changes in urine odor. If you have a history of kidney stones and your urine regularly smells like sulfur, it is worth discussing with a urologist whether the stone type and the odor are connected.
When a Fistula Connects the Gut to the Bladder
A less common but more serious cause of sulfurous or frankly fecal-smelling urine is a fistula, an abnormal connection between the intestine and the bladder. When such a connection forms, intestinal contents including gas and stool can pass into the urinary tract. The result can include gas bubbles in the urine, fecal material in the urine, and recurrent urinary infections caused by gut bacteria ascending into the bladder.7PubMed Central. Pneumaturia and faecaluria: Symptoms leading to a life-saving diagnosis
Fistulas between the bowel and the bladder can develop from advanced diverticular disease, colorectal cancer, Crohn’s disease, or as a complication of pelvic surgery or radiation therapy. The urine in these cases often smells more like sewage than a typical sulfur smell, and the presence of visible particles or bubbles is a red flag that distinguishes this from other causes. This is a condition that requires imaging and surgical evaluation, not watchful waiting.
Occupational and Environmental Hydrogen Sulfide Exposure
For some people, the sulfur in their urine is not coming from inside the body at all but from hydrogen sulfide inhaled at work or in the environment. Workers in oil refineries, wastewater treatment plants, natural gas operations, and certain agricultural settings are routinely exposed to hydrogen sulfide gas. When inhaled, the body metabolizes it and excretes sulfur-containing byproducts in the urine.
A study of oil refinery workers in Iraq found that those working near areas with measurable hydrogen sulfide levels had elevated urinary levels of dimethylsulfoxide, a metabolite of inhaled hydrogen sulfide, compared to controls living in a nearby city with no detectable environmental hydrogen sulfide.8PubMed. Urinary excretion of H(2)S methylation metabolites in oil refinery workers For monitoring workplace exposure after incidents, urinary thiosulfate has been proposed as a biological marker, with multiple urine samples recommended between the time of exposure and up to 15 hours afterward.9PubMed. Case studies of hydrogen sulphide occupational exposure incidents in the UK
Outside the workplace, natural hot springs, volcanic areas, and even some well-water supplies can contain enough hydrogen sulfide to be noticeable. People who live in areas with sulfur-rich well water sometimes report that their urine takes on a stronger sulfurous note, though the exposure levels are generally much lower than in occupational settings.
When the Problem Is Your Nose, Not Your Urine
Sometimes the rotten-egg smell is a phantom. Parosmia is a condition in which your brain misinterprets real smells, often rendering neutral or pleasant odors as foul. It became much more widely recognized during the COVID-19 pandemic because viral damage to the olfactory nerve is one of its most common triggers. People with parosmia frequently report that sulfur-related scents are the most distorted. Among individuals with smell disorders, sulfur-containing substances like onion, egg, and garlic were among the most commonly reported triggers for distorted smell episodes.10medRxiv. Prevalence and Correlates of Parosmia and Phantosmia among Smell Disorders
If you notice the rotten-egg smell in your urine but also notice that other things smell wrong to you, particularly coffee, cooked meat, onions, or garlic, parosmia is a plausible explanation. The condition can last months after a viral infection, though it typically improves gradually. If other people cannot detect the smell when you can, or if common foods are also smelling “off” or disgusting to you, an evaluation by an ENT specialist or a smell-disorder clinic is more appropriate than a urinary workup.
Deciding When to See a Doctor
A one-off episode of sulfur-smelling urine after eating asparagus, garlic-heavy pasta, or a protein-heavy meal does not need medical attention. Neither does a concentrated first-morning specimen that resolves once you hydrate through the day. The situations that warrant a visit are ones where the smell persists despite diet changes and good hydration, where it is accompanied by pain, fever, blood in the urine, or cloudiness, or where there is any chance you have been exposed to hydrogen sulfide at work or in the environment.
Recurrent sulfurous urine in someone with a history of kidney stones should prompt a conversation about stone composition, particularly whether cystine stones could be involved. And if the smell is truly sewage-like with visible particles or gas bubbles, a fistula needs to be investigated urgently. For most people, though, the rotten-egg smell is a dietary footnote rather than a medical alarm, one that fades with time and a glass of water.
Asparagus and the Genetic Ability to Smell It
One curious footnote to the food-and-sulfur story involves asparagus specifically. Nearly everyone who eats asparagus produces the sulfur metabolites that smell, but not everyone can detect them. The ability to smell asparagus-metabolized urine is itself genetically variable. Studies have found that a significant fraction of the population carries variants near olfactory receptor genes that render them unable to detect the odor. So if you have never noticed a sulfurous smell after eating asparagus, it may not be that your body processes it differently. You may simply lack the receptor sensitivity to pick up on what is there. Conversely, people who are particularly sensitive to sulfur-containing volatiles may notice odor changes in their urine that others around them cannot, which can be confusing and anxiety-provoking when the smell seems to come out of nowhere.