provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeHealth ConditionsPregnancy

What Antibiotics Can You Take While You’re Pregnant?

Nicole E. Cieri-Hutcherson, PharmD, BCPS, NCMPJoshua Murdock, PharmD, BCBBS
Updated on February 4, 2025

Key takeaways:

  • A healthcare professional might prescribe antibiotics during pregnancy to treat bacterial infections. Treating infections is important for the health of both you and your fetus.

  • Some antibiotics are generally considered safe to take during pregnancy. Notable examples include amoxicillin (Amoxil) and cephalexin.

  • You should avoid certain antibiotics, like tetracyclines and fluoroquinolones, in pregnancy. You should only take them if they’re your only practical option. If you took an unsafe antibiotic before you knew you were pregnant, contact your healthcare team right away.

A pregnant adult holding a pill bottle.
EllenaZ/iStock via Getty Images Plus

If you’re pregnant, it’s important to know which medications are safe and which ones you should avoid. About 80% of medications prescribed during pregnancy are antibiotics. Since they’re so common, it’s natural to have questions about antibiotics and pregnancy.

Bacterial infections shouldn’t be left untreated during pregnancy. They can cause negative effects for both you and your fetus. And there are several antibiotics that are considered safe to take if you’re expecting.

Here, we’ll discuss which antibiotics are considered safe and which ones aren't. We’ll also review what to do if you took an unsafe antibiotic before realizing you were pregnant. 

Search and compare options

Search is powered by a third party. By clicking a topic in the advertisement above, you agree that you will visit a landing page with search results generated by a third party, and that your personal identifiers and engagement on this page and the landing page may be shared with such third party. GoodRx may receive compensation in relation to your search.

What antibiotics are safe during pregnancy?

Many antibiotics, such as amoxicillin (Amoxil), are considered safe to take during pregnancy.

Determining which medications are safe during pregnancy has a lot to do with the placenta. It’s an organ your body makes after you become pregnant that does a few different jobs. It allows nutrients to get to the fetus. It also helps remove waste from the fetus. In short, the placenta acts as a filter between you and your fetus.

Antibiotics are known to go through the placenta and reach the fetus. Some antibiotics are still considered safe even though they cross the placenta. But others aren’t safe at all or they’re only safe at certain stages of pregnancy.

Below, you’ll find detailed information on antibiotics you can take during pregnancy. Keep in mind that the following are just the most commonly used antibiotics. There are other safe options that aren’t discussed here. Be sure to ask your prenatal care team if you’re unsure whether an antibiotic is safe during pregnancy.

Penicillins

Penicillins are some of the most commonly prescribed antibiotics during pregnancy. They’re often first-choice antibiotics. Examples of penicillin antibiotics include penicillin VK, amoxicillin and ampicillin.

Penicillins aren’t known to harm the fetus. Your prescriber may also choose to prescribe amoxicillin / clavulanic acid (Augmentin). This is also considered a safe antibiotic during pregnancy. It can be used for infections where amoxicillin may not work well enough on its own.

GoodRx icon
  • Why are you sick more often during pregnancy? Physicians explain what happens to your immune system while pregnant and ways you can give it a boost.

  • Other medication to avoid: Experts review several medications, beyond certain antibiotics, that aren’t considered safe during pregnancy.

  • Common infections: Urinary tract infections (UTIs) are a common reason you may need antibiotics during pregnancy. Read more about UTIs in pregnancy and how to treat them.

Cephalosporins

Cephalosporins are another group of first-choice antibiotics that work similarly to penicillins. One of the most prescribed of this class is cephalexin.

Most cephalosporins are also considered safe antibiotics during pregnancy. Although some, such as ceftolozane / tazobactam (Zerbaxa), have less safety information available. So your prescriber may choose a cephalosporin with more research to back up its safety if they can.

One exception is ceftriaxone. Ceftriaxone is an IV cephalosporin. It can be used throughout most of pregnancy. But your healthcare team should try to avoid it close to the time of delivery. This is because ceftriaxone late in pregnancy could cause a condition called kernicterus. Kernicterus is a severe form of infant jaundice (yellowing of the skin). It can cause brain damage and other long-term health problems.

Azithromycin

Azithromycin (Zithromax) belongs to the macrolide class of antibiotics. Azithromycin is generally considered safe in pregnancy. But there is mixed information on how safe other macrolides are during pregnancy.

Two other common macrolides are erythromycin (EryPed) and clarithromycin (Biaxin XL). There are reports of these antibiotics causing a narrowing of the opening to the baby’s stomach. There are also reports that they can cause a baby’s intestines to fold over on itself.

But in a large review, a consistent link between macrolides and these conditions hasn’t been found. However, many healthcare professionals avoid prescribing erythromycin and clarithromycin during pregnancy if they can to be on the safe side.

What antibiotics are not safe during pregnancy?

When a fetus is exposed to some medications, they can harm their growth and development. It’s important to know which antibiotics aren’t safe at any time during pregnancy. You should also know which ones might only be safe at certain times. This way, you know which ones to avoid and when.

Like the above section, this list doesn’t discuss all antibiotic classes. Be sure to discuss your antibiotic with your prenatal care team before starting it.

Tetracyclines

Tetracycline antibiotics include doxycycline (Vibramycin), minocycline (Minocin), and tetracycline. These aren’t recommended during any stage of pregnancy. This is because they’re known to harm a fetus.

When a fetus is exposed to a tetracycline antibiotic, it can bind to calcium in the fetus’ bones and teeth. This can cause a permanent yellow or gray discoloration of bones and teeth. Taking tetracycline antibiotics during pregnancy is also linked to certain heart defects.

Tetracycline antibiotics may only be used in very rare situations. For example, a life-threatening infection that requires tetracyclines.

Fluoroquinolones

Fluoroquinolone antibiotics include ciprofloxacin (Cipro), levofloxacin, and moxifloxacin. They aren't often used in pregnancy because they have a risk of causing birth defects.

Fluoroquinolones may cause harm to a fetus’ developing heart, kidneys, or brain. They’re also linked to certain lung defects. They might only be used if there are no alternatives to treat your infection.

Metronidazole

Metronidazole (Flagyl) is an antibiotic used for certain infections, like bacterial vaginosis. This antibiotic should only be used at certain stages of pregnancy.

Oral metronidazole may be safe during the second and third trimesters of pregnancy (weeks 14 until delivery). But using it in the first trimester (weeks 1 to 13) is linked to premature birth. There’s also concern that metronidazole may raise the risk of miscarriage. But more studies are needed to confirm these links.

Vaginal metronidazole should be used with caution at any point during pregnancy. This is because there’s concern that it can cause a condition in the baby’s brain called hydrocephalus. This is a buildup of fluid in the brain. It can be life-threatening in some situations.

Nitrofurantoin

Nitrofurantoin (Macrobid, Macrodantin) is an antibiotic usually used for urinary tract infections (UTIs). Nitrofurantoin has mixed data on how safe it is in the first trimester of pregnancy. But it’s still a common choice for treating UTIs later in pregnancy.

In a review of eight studies, a link between nitrofurantoin and birth defects wasn’t seen in most studies. But some studies reported higher rates of birth defects when it was taken in the first trimester.

Sulfamethoxazole / trimethoprim

Sulfamethoxazole / trimethoprim (Bactrim) also has conflicting data on how safe it is in the first trimester.

Taking this antibiotic in early pregnancy is linked to cleft palate, heart defects, and neural tube defects like spina bifida. Taking it towards the end of pregnancy can also raise the risk of kernicterus.

Sulfamethoxazole / trimethoprim might be used in the second and early third trimesters. But it’s still avoided in most cases. This is because this antibiotic blocks folic acid in the body. Folic acid is very important to the healthy development of a fetus.

If this antibiotic is necessary, you’ll likely need to take extra folic acid supplements.

What happens if you take an unsafe antibiotic before you realize you’re pregnant?

Sometimes you might not realize you’re pregnant until you're further along. In this case, it’s possible to have taken an unsafe antibiotic.

If you took an unsafe antibiotic, contact your prenatal care team right away. They may recommend an ultrasound to look for any problems so you can make a plan together. Or, they might recommend vitamins or supplements to lower the risk of complications.

If you’re unable to reach your prenatal care team, visit the MotherToBaby website or call them at 1-866-626-6847. They also have a text line (1-855-999-3525) you can use, as well as a live chat tool and email form on their website. You can ask questions to an expert in medication use during pregnancy.

Frequently asked questions

What happens if you get pregnant while taking antibiotics?

Contact your prescriber right away if you discover that you’re pregnant while taking antibiotics. They can determine the safest option for you and your fetus. You may need to switch to a different antibiotic that’s safer during pregnancy. It’s also a good idea to discuss your family planning goals with your prescriber before starting antibiotics. Some antibiotics interfere with birth control.

What antibiotics are high risk during pregnancy?

Tetracycline and fluoroquinolone antibiotics are generally not prescribed during pregnancy. Prescribers may consider them if they're the only option to treat a serious infection. They’re linked to certain birth defects at all stages of pregnancy.

Can antibiotics during pregnancy cause birth defects?

There’s a link between some antibiotics and certain birth defects. Examples include doxycycline, which is linked to heart defects. And moxifloxacin is linked to respiratory defects. Other antibiotics have no known link to birth defects. These include amoxicillin, penicillin, and cephalexin.

The bottom line

It’s common for healthcare professionals to prescribe antibiotics for infections during pregnancy. Treating infections in pregnancy is important. Infections can have negative effects on you and your fetus if left untreated. But there are several antibiotics that are considered safe to take during pregnancy.

Penicillins, most cephalosporins, and azithromycin are considered first-choice options during pregnancy. But it’s recommended to avoid certain antibiotics, such as tetracyclines and fluoroquinolones. If you took an unsafe antibiotic before realizing you were pregnant, contact your prenatal care team right away. With their help, you can make a plan to keep your developing fetus as safe as possible.

why trust our exports reliability shield

Why trust our experts?

Nicole E. Cieri-Hutcherson, PharmD, BCPS, NCMP
Nicole E. Cieri-Hutcherson, PharmD, BCPS, NCMP, has over a decade of experience as a pharmacist, professor, and researcher. She was a full-time clinical professor in the pharmacy practice department at D’Youville School of Pharmacy before subsequently joining the faculty of the pharmacy practice department at the University at Buffalo School of Pharmacy and Pharmaceutical Sciences.
Christina Aungst, PharmD
Christina Aungst, PharmD, is a pharmacy editor for GoodRx. She began writing for GoodRx Health in 2019, transitioning from freelance writer to editor in 2021.
Joshua Murdock, PharmD, BCBBS
Joshua Murdock, PharmD, BCBBS, is a licensed pharmacist in Arizona, Colorado, and Rhode Island. He has worked in the pharmacy industry for more than 10 years and currently serves as a pharmacy editor for GoodRx.

References

Ajiji, P., et al. (2021). Investigating the efficacy and safety of metronidazole during pregnancy; A systematic review and meta-analysis. European Journal of Obstetrics and Gynecology and Reproductive Biology.

American College of Obstetricians and Gynecologists. (2023). Urinary tract infections in pregnant individuals.

View All References (10)

Bookstaver, P. B., et al. (2015). A review of antibiotic use in pregnancy. Pharmacotherapy.

Centers for Disease Control and Prevention. (2024). Medicine and pregnancy: An overview.

Dinur, A. B., et al. (2013). Fetal safety of macrolides. Antimicrobial Agents and Chemotherapy.

Goldberg, O., et al. (2015). Exposure to nitrofurantoin during early pregnancy and congenital malformations: A systematic review and meta-analysis. Journal of Obstetrics and Gynecology Canada.

Kapila, V., et al. (2023). Physiology, placenta. StatPearls.

MedlinePlus. (2023). Pyloric stenosis in infants.

MedlinePlus. (2024). Intussusception. StatPearls.

Muanda, F. P., et al. (2017). Use of antibiotics during pregnancy and the risk of major congenital malformations: A population based cohort study. British Journal of Clinical Pharmacology.

National Institute of Neurological Disorders and Stroke. (2024). Hydrocephalus.

Reddy, D. K., et al. (2023). Kernicterus. StatPearls.

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Get the facts on Pregnancy.

Sign up for our newsletter to get expert tips on condition management and prescription savings.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.

Related Articles