Quick answer
For most people, antibiotics don't cause anxiety, but some individuals report anxiety or mood changes on certain antibiotics — through side effects, effects on the gut microbiome, or the stress of being ill. It's uncommon but recognized. If anxiety started after beginning an antibiotic, discuss it with your doctor.
The possible connections
For the majority of people, a course of antibiotics won't cause anxiety. However, there are a few ways antibiotics could affect anxiety in some individuals. Certain antibiotics list mood changes, anxiety, or nervousness among their possible (usually uncommon) side effects, and a few specific classes have been more associated with neurological or psychological effects. Antibiotics also disrupt the gut microbiome (killing beneficial bacteria along with harmful ones), and given the emerging understanding of the gut-brain axis, some researchers and individuals wonder whether this could transiently affect mood and anxiety — though this connection is still being studied and isn't well established. So while uncommon, an antibiotic effect on anxiety is recognized as possible for some.
Other factors to consider
When anxiety coincides with taking antibiotics, it's worth considering that the underlying illness being treated might itself be contributing to anxiety (being unwell, having an infection, and the stress of illness can all affect mood), rather than the antibiotic alone. Sleep disruption from illness, general feeling unwell, and worry about the illness can all play a role. Some antibiotics can also cause physical side effects (like an upset stomach) that make you feel generally off. So if you feel anxious during a course of antibiotics, the cause could be the medication, the illness, the disruption to your routine, or a combination — it's not always straightforward to pinpoint.
What to do
If you notice significant anxiety or mood changes after starting an antibiotic, it's worth discussing with your doctor or pharmacist — this is a legitimate thing to raise, and they can advise whether the specific antibiotic is a likely factor and whether an alternative might be appropriate. Don't stop a prescribed antibiotic course on your own without medical advice, as completing antibiotic courses matters for treating the infection properly and preventing resistance. In most cases, any anxiety associated with an antibiotic resolves after the course ends. If you're concerned or the anxiety is significant, a conversation with your prescriber is the right step. And supporting gut health afterward (with a good diet and perhaps probiotics) is reasonable, though its effect on anxiety is uncertain.
Why causes matter — and their limits
Understanding what feeds your anxiety helps you make smart changes, but you don't need to find 'the' cause to recover. Modern treatment works on the maintaining loop — how anxiety sustains itself today — which is why therapy helps even when the original trigger is unclear. A professional can help with both.
This article is for general information only and is not medical advice, diagnosis, or treatment. Always consult a qualified health professional about your situation. If you are in crisis, contact your local emergency number or a crisis line immediately.