What Is an Eye Infection? Causes, Types & Symptoms

An eye infection is an illness caused by bacteria, viruses, fungi, or parasites that invade and multiply in any part of the eye. Infections can strike the thin membrane covering the white of your eye (conjunctivitis), the clear front surface (keratitis), the eyelids, or even the interior of the eyeball. Most eye infections are mild and resolve on their own within days to weeks, but some can permanently damage your vision if left untreated.

The Most Common Types

Eye infections are categorized by which structure they affect and what organism causes them. The most familiar is pink eye, or conjunctivitis, an infection or inflammation of the thin membrane lining the white of your eye and the inside of your eyelid. Pink eye can be caused by bacteria, viruses, or allergies. Bacterial conjunctivitis typically produces a thick yellow or green discharge throughout the day, while viral conjunctivitis causes watery eyes during the day and sticky lids in the morning. Both forms are contagious and can spread from one eye to the other or to other people through shared towels, pillowcases, or direct contact.

Keratitis is an infection of the cornea, the clear dome at the front of the eye. It’s more serious than conjunctivitis because the cornea is directly responsible for focusing light. Bacteria, viruses (particularly herpes simplex), fungi, and parasites can all cause keratitis. Without prompt treatment, keratitis can lead to corneal scarring, open sores called corneal ulcers, and permanent vision loss.

Infections also commonly affect the eyelids. A stye is a small, painful lump that forms at the base of an eyelash or under the eyelid, usually from a bacterial infection in a hair follicle or oil gland. It looks and feels like a pimple. A chalazion is similar in appearance but develops farther back on the eyelid when an oil gland clogs. Chalazia are generally painless. Blepharitis is a broader condition where the edges of both eyelids become red, swollen, and coated with oily debris and bacteria.

The most dangerous type is endophthalmitis, an infection inside the eyeball itself. This is rare but can occur after eye surgery or a penetrating injury. It causes severe pain and requires immediate treatment.

Common Causes and Risk Factors

Everyday bacteria like staphylococcus and streptococcus are behind many bacterial eye infections. Viruses, especially herpes simplex and adenoviruses, cause many cases of viral conjunctivitis and keratitis. Fungi and parasites are less common culprits but are particularly associated with contact lens use and water exposure.

Contact lens wearers face higher risks across the board. One well-studied parasite, Acanthamoeba, lives in oceans, rivers, lakes, and even tap water. CDC research found that contact lens wearers who swam while wearing their lenses were more than six times as likely to develop Acanthamoeba keratitis compared to those who removed them. People who didn’t disinfect their lenses as frequently as recommended were nearly six times more likely to get infected. Homemade saline solutions are especially dangerous: every sample tested in a CDC study was colonized with bacteria and fungi, and 73% showed high levels of contamination.

A scratch or foreign object in the eye can also open the door to infection. Any break in the cornea’s surface gives microorganisms a way in. Sexually transmitted infections including herpes, gonorrhea, and syphilis can affect the eyes as well, and pubic lice can infest the eyelashes.

Symptoms to Watch For

The symptoms depend on which part of the eye is involved, but common signs include redness, pain or irritation, discharge (watery or thick), swelling of the eyelid, light sensitivity, blurred vision, and the sensation that something is stuck in your eye. Mild conjunctivitis might cause little more than pink, goopy eyes, while keratitis or endophthalmitis can produce sharp pain and noticeable vision changes.

Certain symptoms signal something more serious. Partial or total vision loss, visible wounds on the eye, leaking blood or clear fluid from the eye, or intense pain with light sensitivity all warrant immediate medical attention. Orbital cellulitis, an infection that spreads to the eye socket, can cause the eyelid to swell shut and restrict eye movement. This is a medical emergency.

Herpes Simplex and Recurring Infections

Herpes simplex virus deserves special mention because it behaves differently from most eye infections. Once you’re infected with herpes simplex, the virus stays in your body permanently and can reactivate, causing repeated episodes of eye herpes (ocular herpes). Symptoms include eye pain, redness, light sensitivity, and sometimes blisters or a rash on the skin around the eye.

There’s no cure for herpes simplex, but antiviral treatment can suppress flare-ups, limit damage to the cornea, and help prevent permanent vision loss. If you’ve had one episode, your eye doctor will likely discuss a long-term management plan to reduce recurrences.

How Long Recovery Takes

Viral pink eye typically clears up in 7 to 14 days without treatment, though some cases drag on for two to three weeks. Bacterial pink eye improves faster, often in 2 to 5 days, though it can take up to two weeks to fully resolve. Antibiotic eye drops can shorten the course and reduce the chance of spreading it to others. For bacterial conjunctivitis, drops are typically applied every two to four hours while awake for the first two days, then four times daily for about five more days.

Keratitis takes longer. Treatment for a bacterial corneal ulcer involves drops as often as every 30 minutes during waking hours for the first two days, tapering over a week or more. The total treatment period depends on how well the infection responds. Fungal and parasitic keratitis can take weeks to months of treatment.

Preventing Eye Infections

Most eye infections spread through contact with contaminated hands, surfaces, or water. The CDC recommends washing your hands with soap and water for at least 20 seconds before touching your eyes or handling contact lenses. If soap isn’t available, hand sanitizer with at least 60% alcohol works as a substitute.

Contact lens hygiene is critical. Clean, disinfect, and replace your lenses on the schedule your eye doctor recommends. Never use homemade saline, rinse lenses with tap water, or swim in contacts without watertight goggles. If you develop an eye infection, throw away disposable lenses and their cases and stop wearing contacts until the infection has fully cleared.

To avoid spreading conjunctivitis, don’t share towels, pillowcases, or eye makeup. Use a fresh disposable tissue each time you wipe your eyes, one per eye to avoid spreading the infection between them. If you work with children, elderly people, patients, or food, stay home while your eyes are red, watery, or producing discharge.