What Causes Styes in the Eyes and How to Treat Them

Styes are caused by bacterial infection of the small oil glands along your eyelid margin. The culprit is almost always staphylococcal bacteria, the same type that commonly lives on your skin. When one of these glands gets blocked, bacteria multiply inside the trapped oil, triggering a painful, red bump that resembles a pimple at the base of your eyelash.

But the bacterial infection is only the final step. Understanding why the gland gets blocked in the first place is what really answers the question, especially if you keep getting styes.

How a Stye Forms

Your eyelids contain dozens of tiny oil-producing glands that keep your tears from evaporating too quickly. There are two types that matter here. The glands along the outer edge of your eyelid (near the lash line) produce oil that coats the surface of the eyelash follicle. The deeper glands, embedded in the firm tissue of the eyelid itself, release oil directly onto the surface of your eye with each blink.

An external stye forms when one of the shallow glands near a lash follicle becomes blocked and infected. This is the more common type. It shows up as a small yellowish pustule right at the base of an eyelash, surrounded by swelling and redness. Within two to four days, it typically ruptures on its own, drains, and the pain resolves.

An internal stye forms deeper in the eyelid, in the larger oil glands. These tend to be more painful and can cause more dramatic swelling. Because the infection sits further from the surface, internal styes sometimes don’t drain as easily and can develop into a firm, painless lump called a chalazion if the inflammation becomes chronic.

In both cases, the sequence is the same: the gland’s opening gets clogged, the oil inside thickens and stagnates, and bacteria that were harmlessly sitting on the skin surface suddenly have a warm, sealed environment to grow in.

The Most Common Triggers

Several everyday habits and conditions make that initial gland blockage more likely.

Touching your eyes with unwashed hands. This is the most straightforward cause. Your fingers carry staphylococcal bacteria, and rubbing your eyes transfers them directly to the gland openings along your lash line. Even brief contact is enough.

Old or shared eye makeup. Cosmetics applied near the eyes pick up bacteria from your skin with every use, and contamination increases over time. Shared makeup, like testers at beauty retailers, exposes products to multiple people’s skin bacteria. Research on cosmetic testers has found they commonly harbor bacteria, including antibiotic-resistant strains. The risk is highest when these products touch delicate areas like the eyes or mucous membranes. Mascara, eyeliner, and eyeshadow brushes that aren’t cleaned regularly can reintroduce bacteria to the lash line each time you apply them.

Sleeping in contact lenses or poor lens hygiene. Contact lenses create a surface where bacteria and proteins accumulate throughout the day. Sleeping in them, reusing old solution, or skipping the rubbing step when cleaning them all increase the bacterial load near your eyes. The American Academy of Ophthalmology recommends replacing your lens case at least three times a year and never extending the wear time beyond what your lenses are designed for. Even “no-rub” solutions work better when you physically rub the lens during cleaning to loosen buildup.

Not removing makeup before bed. Leaving eye makeup on overnight gives bacteria hours to accumulate in and around your eyelash follicles while the gland openings remain coated and blocked.

Underlying Conditions That Cause Recurring Styes

If you get styes more than once or twice a year, an underlying eyelid condition is likely involved.

Blepharitis is the most common one. It’s chronic, low-grade inflammation of the eyelid margins that causes the oil glands to produce thicker secretions. These thickened secretions are more prone to clogging. People with blepharitis often notice crusty or flaky debris along their lash line, especially in the morning. The condition doesn’t go away on its own but can be managed with daily lid hygiene.

Ocular rosacea is another significant contributor. People with rosacea on their face frequently develop eye involvement, which causes eyelid inflammation, redness, and swelling. Styes and chalazia are listed among the most common symptoms. If you have facial rosacea and keep getting styes, the two are likely connected.

Other factors that increase your risk include hormonal changes that alter oil gland output, high stress levels that may suppress local immune function, and conditions like seborrheic dermatitis that affect oil production across the face.

Stye vs. Chalazion

In the first day or two, these two bumps look identical. Both cause redness, swelling, and pain. The difference becomes clear after a couple of days. A stye stays painful and localizes to the very edge of the eyelid, often developing a visible white or yellow head. A chalazion migrates toward the center of the eyelid, loses its tenderness, and becomes a firm, painless nodule.

The underlying cause is different too. A stye is an active infection. A chalazion is a non-infectious blockage where trapped oil triggers a chronic inflammatory reaction. Chalazia often evolve from internal styes that didn’t fully resolve, which is another reason treating styes early matters.

What Helps a Stye Resolve

Most styes clear up on their own within a week. The single most effective thing you can do is apply warm, wet compresses for 5 to 10 minutes, three to six times a day. The warmth softens the hardened oil plug and encourages the gland to drain naturally. Use a clean washcloth soaked in warm (not hot) water, and reheat it as it cools so you maintain consistent warmth throughout each session.

Resist the urge to squeeze or pop a stye. Forcing it open can push the infection deeper into the eyelid tissue or spread bacteria to neighboring glands. Let it drain on its own. If a stye hasn’t improved after a week of consistent warm compresses, or if it keeps growing, a doctor can drain it with a small incision or prescribe antibiotics if the infection has spread beyond the gland.

Preventing Styes From Coming Back

Prevention comes down to keeping the lash line clean and the oil glands flowing freely. Washing your eyelashes and lash line daily with diluted baby shampoo on a clean cotton pad removes the debris and bacteria that lead to blockages. Your doctor may also recommend an antimicrobial eyelash spray, which typically contains hypochlorous acid, a gentle disinfectant your own immune cells naturally produce.

Beyond lid hygiene, a few practical habits make a real difference. Replace eye makeup every three months, and never share mascara or eyeliner. Wash your hands before touching your eyes or handling contact lenses. Remove all eye makeup before bed. If you wear contacts, follow the replacement schedule exactly and clean your lens case regularly.

Signs a Stye Needs Urgent Attention

A stye can, in rare cases, progress to a more serious skin infection around the eye called preseptal cellulitis, where bacteria spread beyond the gland into the surrounding eyelid tissue. Warning signs include spreading redness and swelling that extends well beyond the bump, fever, eye pain that worsens rather than improves, vision changes, or a feeling that the eye is being pushed forward. In children especially, these symptoms warrant an emergency room visit, since the infection can spread deeper into the eye socket if untreated.