An eye infection is a disease of the eye that you get because of a microorganism like a bacterium, a virus or a fungus. The most common eye infection is pink eye (conjunctivitis).
Viruses cause most cases of infection, but bacteria can cause them, too. You can’t treat viral infections with antibiotics. Antibiotics only work on bacterial infections.
Eye infections can happen in one eye or both eyes. Some infections aren’t serious. Others are medical emergencies that can cause vision loss. Eye infections can affect nearly any part of your eye. You can have an infection on your eyelid, your conjunctiva or cornea, or the external parts of your eye.
Eye infections are common. About 1 million people in the U.S. go to their healthcare providers or to hospitals with eye infections each year. Many of these infections happen to people who wear contact lenses.
An infected eye may look or feel different than usual. Early signs and symptoms of an eye infection may include:
Later signs and symptoms of eye infections may include:

You can get eye infections from bacteria, fungi (plural of fungus), parasites or viruses. These small organisms can enter your eyes in many ways, including eye injuries. One of the most common ways to get an eye infection is to sleep in your contact lenses. It’s also common to get an eye infection if you don’t properly clean your lenses.
You might be able to tell if you have an eye infection, but it’s best to consult a healthcare provider. They’ll take your medical history, ask you questions about your symptoms and do a thorough eye exam. They may also take a swab of any discharge from your eye to send to a lab for testing.
Treatment for eye infections depends on what’s causing your eye infection. It might include anti-infective medication in various forms, such as eye drops, ointments or tablets. It usually takes 24 to 48 hours for antibacterial medications to work.
You may have to let viral or allergic infections clear on their own, but you may be able to make yourself more comfortable with the following home remedies:
Eye infections due to allergies aren’t contagious or dangerous to your sight. You don’t need to avoid other people.
You can spread eye infections due to viruses, bacteria or fungi to other people. You should avoid being around others until you treat your condition.
Some eye infections are dangerous to your vision, such as those due to eye injuries and infections of your cornea. This is why it’s best to contact an eye care specialist to evaluate your eye. They’ll know what’s causing your eye infection and how to treat it effectively.
You may not be able to prevent every eye infection, but you can take steps to reduce your risk. These may include:
