What Do You Do for a Kidney Infection: Treatment and Care

A kidney infection requires antibiotics, and most people can treat it at home with an oral prescription that lasts 5 to 14 days depending on the medication. Unlike a simple bladder infection, a kidney infection (also called pyelonephritis) involves bacteria that have traveled up from the bladder into one or both kidneys, and it won’t resolve on its own. Getting treatment quickly matters because untreated kidney infections can spread to the bloodstream.

How a Kidney Infection Is Diagnosed

If you go to a doctor or urgent care with flank pain, fever, and painful urination, you’ll likely give a urine sample. A urinalysis checks for white blood cells and blood in your urine, both signs your body is fighting a bacterial infection. A urine culture then identifies the specific type of bacteria causing the problem, which helps your doctor choose the right antibiotic.

The bacterium E. coli is responsible for 70 to 90 percent of uncomplicated kidney infections. It normally lives in the gut but can enter the urinary tract and work its way up to the kidneys. Less common bacteria cause the remaining cases, particularly in people with urinary tract abnormalities or catheters.

What Antibiotic Treatment Looks Like

For an uncomplicated kidney infection, doctors typically prescribe one of a few oral antibiotics. Fluoroquinolone antibiotics are a common first choice, with treatment courses running 5 to 7 days. Another option, trimethoprim-sulfamethoxazole, requires a longer course of 14 days. Your doctor picks the antibiotic based on what’s likely to work against the bacteria in your area, since resistance patterns vary by region.

Antibiotic resistance is a growing concern. In areas where resistance rates are high (above 10 percent for a given drug), your doctor may give you a single injection of antibiotics at the office or hospital before sending you home with oral pills. This one-time dose gives the oral medication a head start. A urine culture result, which usually comes back in a day or two, can confirm whether the antibiotic you’re taking will actually work. If the bacteria turn out to be resistant, your doctor will switch you to a different drug.

Finishing the full course of antibiotics is essential, even once you start feeling better. Stopping early allows surviving bacteria to rebound and potentially become harder to treat.

Managing Pain During Recovery

Kidney infections cause a deep, aching pain in your back or side, often along with fever and general misery. Acetaminophen (Tylenol) is the safest over-the-counter option for bringing down fever and easing pain while you recover.

Be cautious with ibuprofen, naproxen, and other anti-inflammatory painkillers (NSAIDs). These drugs can harm your kidneys, especially when you’re dehydrated or your blood pressure is low, both of which are common during a kidney infection. If you’re running a fever and not keeping fluids down well, NSAIDs lose their safety margin quickly. A heating pad on your back or side can also help with the flank pain without adding any risk to your kidneys.

Hydration and Home Care

Drinking plenty of fluids helps flush bacteria out of your urinary tract and supports your body’s recovery. Aim for 8 to 12 glasses of fluid per day, with water being the best choice. This can feel like a lot when you’re nauseated or feverish, so sipping steadily throughout the day is easier than trying to drink large amounts at once.

Rest matters too. A kidney infection is not a “push through it” illness. Most people feel wiped out for the first few days, and giving your body time to fight the infection alongside the antibiotics makes a real difference. Avoid alcohol and caffeine, which can irritate the bladder and contribute to dehydration.

When You Should Expect to Feel Better

Symptoms typically begin improving within a few days of starting antibiotics. Fever usually breaks first, often within 48 to 72 hours. The flank pain and urinary symptoms tend to linger a bit longer but should steadily improve throughout the first week. If you don’t notice any improvement after 48 hours on antibiotics, contact your doctor. This could mean the bacteria are resistant to the drug you were prescribed, and you may need a different antibiotic.

Signs You Need Emergency Care

Most kidney infections resolve with outpatient antibiotics, but some become serious enough to require hospital treatment. The biggest risk is the infection entering your bloodstream, a condition called urosepsis. This is a medical emergency.

Go to an emergency room if you experience any of these:

  • Rapid heart rate or heart palpitations
  • Difficulty breathing or fast, shallow breaths
  • High fever with chills that won’t break
  • Feeling faint or confused, which can signal low blood pressure
  • Inability to keep fluids or medications down due to vomiting

In the hospital, treatment involves intravenous fluids and IV antibiotics, which deliver medication directly into your bloodstream for faster results. Once your fever breaks and you’re stable (usually within about 48 hours), doctors typically switch you back to oral antibiotics to finish the course at home.

Who Faces Higher Risk of Complications

Kidney infections can affect anyone, but certain groups are more likely to develop severe infections or need hospitalization. Pregnant women with kidney infections are almost always treated aggressively because the infection poses risks to both mother and baby. People with diabetes, weakened immune systems, or structural abnormalities in the urinary tract (such as kidney stones blocking urine flow) are also at higher risk for complications.

Men get kidney infections less often than women, but when they do, the infection is more likely to be classified as complicated because it often signals an underlying issue like an enlarged prostate or kidney stone that’s trapping urine and bacteria. These cases sometimes require imaging (usually an ultrasound or CT scan) to check for blockages that need separate treatment.

Preventing Future Kidney Infections

Kidney infections almost always start as bladder infections that weren’t caught or treated in time. The most effective prevention strategy is treating urinary tract infections early, before bacteria have a chance to climb to the kidneys. If you notice burning with urination, frequent urges to pee, or cloudy urine, getting checked promptly can stop a simple UTI from becoming something worse.

Staying well hydrated dilutes your urine and helps you urinate more frequently, which physically flushes bacteria out before they can establish an infection. Urinating after sex helps clear bacteria from the urethra. For people who get recurrent UTIs, a doctor may recommend additional preventive strategies tailored to the pattern and frequency of infections.