A urinary tract infection does not directly produce ketones in your urine, but it can trigger metabolic changes that lead to ketone production. Ketones appear when your body shifts from burning carbohydrates to burning fat for energy, and a UTI can set off that shift through fever, reduced appetite, vomiting, or dehydration. If you have diabetes, the connection becomes more significant because a UTI is one of the most common infections that can push the body into a dangerous state called diabetic ketoacidosis.
How Infections Lead to Ketone Production
Ketone bodies are byproducts of fat metabolism. Your body produces them when it runs out of its preferred fuel source, stored carbohydrates (glycogen), and starts breaking down fat instead. This happens any time your body’s energy balance gets disrupted: skipping meals, prolonged vomiting, high fevers, or severe dehydration can all trigger it.
A UTI can cause several of these disruptions at once. Fever increases your metabolic rate, meaning your body burns through its carbohydrate stores faster. Nausea and loss of appetite, which commonly accompany more severe infections, reduce the carbohydrates coming in. Dehydration concentrates your urine and makes any ketones present easier to detect on a dipstick test. Research on infections more broadly shows that even the body’s immune response to an infection ramps up fat-burning pathways in the liver, increasing ketone production as part of the stress response. Studies in both animal models and human patients with infections have confirmed that blood ketone levels rise during acute illness, driven by upregulated fat oxidation enzymes in the liver.
So while the bacteria causing your UTI aren’t producing ketones themselves, the whole-body response to fighting an infection can absolutely put ketones in your urine.
What a Urine Dipstick Actually Tells You
Standard urinalysis tests for several markers at once. When checking for a UTI, the key findings are nitrites (produced by certain bacteria) and leukocyte esterase (a sign of white blood cells fighting infection). Ketones are measured on the same dipstick but are evaluated separately. A positive result for ketones alongside UTI markers doesn’t mean the UTI caused the ketones. It means two things are happening in your body that may or may not be related.
In someone without diabetes, trace ketones during a UTI usually reflect dehydration, fever, or not eating enough. This is especially common in children, where acute febrile illness is a well-recognized cause of ketonuria. In someone with diabetes, positive ketones alongside an infection warrant closer attention because the stakes are higher.
The Diabetes Connection: UTIs and Ketoacidosis
For people with diabetes, a UTI is not just an uncomfortable infection. It’s one of the most common triggers of diabetic ketoacidosis (DKA), a potentially life-threatening condition where ketone levels climb dangerously high. In one clinical study of DKA cases, infections were the leading precipitating factor at 69%, and urinary tract infections specifically accounted for about 31% of those infections.
The mechanism works like this: infection triggers a stress response that floods the body with hormones like cortisol, glucagon, and adrenaline. These hormones push blood sugar up while simultaneously making insulin less effective. In someone whose insulin production is already limited (type 1 diabetes) or whose insulin function is already impaired (type 2 diabetes), this creates a cascade. The body can’t use the glucose in the blood, so it ramps up fat breakdown. The liver converts those fats into ketones at a rate that overwhelms the body’s ability to clear them, and blood becomes dangerously acidic.
If you have diabetes and notice ketones in your urine during a UTI, that combination deserves prompt medical attention rather than a wait-and-see approach.
Ketones as a Risk Factor for UTIs
Interestingly, the relationship between ketones and UTIs may run in both directions. A 2025 study in heart failure patients taking a class of diabetes medications (SGLT-2 inhibitors) found that elevated urinary ketones were an independent risk factor for developing UTIs, with roughly 10 times higher odds of infection compared to patients without ketonuria. The researchers proposed that ketones may impair neutrophil function, a type of white blood cell critical for clearing bacteria. In other words, having ketones in your urine might make it harder for your immune system to fight off a bladder infection in the first place.
This finding reframes ketonuria not just as a metabolic curiosity but as a potential marker of immune vulnerability, particularly in people with diabetes or heart failure who already face elevated infection risk.
Ketones and UTIs During Pregnancy
Pregnant women are tested frequently for both ketones and UTIs, and finding both on the same urine test can be alarming. UTIs are more common during pregnancy due to hormonal and anatomical changes, and ketonuria is also more common, particularly when there’s a clinical reason for testing. One study found that 21% of urine tests performed for a specific clinical concern showed trace or higher ketone levels, significantly more than routine screening samples.
The key nuance here is that ketonuria in pregnancy often reflects an underlying issue like dehydration, morning sickness, or inadequate calorie intake rather than the UTI itself. Researchers have noted that maternal ketones may be a marker of broader physiological stress rather than a direct cause of complications, which means addressing the root cause (treating the infection, staying hydrated, eating enough) matters more than the ketone reading itself.
Other Reasons Ketones Show Up on a Test
If ketones appeared on your urinalysis alongside UTI markers, the infection may not be the explanation at all. Common non-diabetic causes of ketonuria include low-carbohydrate or ketogenic diets, prolonged fasting, intense exercise, and acute illnesses with vomiting or diarrhea. Certain medications can also interfere with test results. Acetylcysteine, sometimes used as a bladder irrigation solution or as a supplement, can cause a false positive ketone reading on dipstick tests by reacting with the test chemistry.
If you’re eating a very low-carb diet and happen to develop a UTI, the ketones on your test likely reflect your diet rather than your infection. Context matters, and your doctor will interpret both results together rather than assuming one caused the other.

