What Causes Styes on Eyelids and How to Prevent Them

Styes are caused by bacterial infection of the tiny oil glands or hair follicles along your eyelid margin. The bacterium most commonly responsible is Staphylococcus aureus, which normally lives on your skin but can cause a painful, localized infection when it gets trapped inside a blocked gland. Understanding why this happens, and what makes some people more prone to it, can help you prevent them from coming back.

How a Stye Forms

Your eyelids contain dozens of small glands that produce oils to keep your eyes lubricated. When one of these glands becomes clogged, bacteria that are already present on your skin can multiply inside the blocked opening, triggering an infection. The result is a red, swollen, tender bump that typically appears right at the edge of your eyelid.

Most styes are external, meaning they develop in the follicle of an eyelash or in one of the small oil glands (called glands of Zeis) attached to the lash root. These look like a small yellowish pustule at the base of an eyelash, surrounded by redness and swelling. Internal styes form deeper in the eyelid, in the larger oil-producing glands embedded in the eyelid tissue itself. Internal styes tend to be more painful and can cause swelling across a wider area, though they’re less common.

In both cases, the underlying problem is the same: thickening and stagnation of the gland’s normal oil secretions, which plugs the gland opening and creates a warm, enclosed space where bacteria thrive.

Risk Factors That Make Styes More Likely

Some people get styes once and never again. Others deal with them repeatedly. The difference often comes down to a few specific habits and conditions.

Blepharitis is the most common underlying cause of recurrent styes. This is a chronic, low-grade inflammation of the eyelid margins that causes the oil glands to produce thicker, stickier secretions. Those thickened secretions are more likely to clog gland openings, setting the stage for infection. If you notice that your eyelids frequently feel crusty, flaky, or irritated, especially in the morning, blepharitis may be the reason styes keep returning.

Contact lenses increase your risk because they introduce another surface that can carry bacteria to your eyes. Touching your lenses with unwashed hands, reusing old contact solution, or sleeping in lenses all raise the odds. Eye makeup is another common culprit. Mascara, eyeliner, and eyeshadow applied near the lash line can physically block gland openings. Old makeup is particularly risky because bacteria multiply in the product over time. Replacing eye makeup at least every three months significantly reduces this risk.

Other factors include touching or rubbing your eyes frequently, not removing makeup before bed, and general fatigue or stress that may lower your immune response. People with skin conditions like rosacea also tend to have oilier, more inflammation-prone eyelid glands.

What a Stye Feels and Looks Like

A stye usually starts as a vague tenderness or slight swelling along the eyelid edge. Within a day or two, it localizes into a distinct, painful bump. External styes produce a visible yellowish head at the lash line, similar to a small pimple. You may also notice watering of the eye, sensitivity to light, and the sensation that something is stuck in your eye.

Internal styes don’t always produce a visible bump on the outside. Instead, you may feel a deeper ache and see redness and swelling across a broader area of the eyelid. If you gently flip the eyelid, the bump is visible on the inner surface.

Styes vs. Chalazions

A chalazion can look very similar to a stye in the first couple of days, and even eye care professionals sometimes can’t tell them apart that early. The key difference is what happens next. A stye stays painful and stays at the eyelid margin, driven by active bacterial infection. A chalazion, on the other hand, develops when a blocked gland becomes inflamed but not truly infected. After a day or two, a chalazion moves toward the center of the eyelid body and forms a firm, painless nodule.

Sometimes a stye that doesn’t fully drain will turn into a chalazion. If you have a bump that was initially painful but has become a hard, painless lump that persists for weeks, it has likely transitioned into a chalazion, which may need different treatment.

How Styes Heal

Most styes resolve on their own within one to two weeks. The standard home treatment is a warm compress: a clean washcloth soaked in warm water, placed gently over the closed eye for about five minutes, several times a day. The warmth helps loosen the clogged oil and encourages the stye to drain naturally. Once it drains, the pain and swelling typically improve quickly.

Resist the urge to squeeze or pop a stye. Forcing it open can spread the infection into surrounding tissue. If a stye doesn’t improve after a week or two of warm compresses, or if it keeps growing, a healthcare provider can drain it with a small procedure in the office. Antibiotic ointments are sometimes prescribed, though they’re more useful for preventing the infection from spreading than for speeding up resolution of the stye itself.

When a Stye Becomes Something More Serious

In rare cases, the infection from a stye can spread beyond the gland and into the soft tissue around the eye. This is called preseptal cellulitis. Signs include redness and swelling that extend well beyond the original bump, warmth across the entire eyelid area, tenderness that feels deeper, and sometimes a fever. The eyelid may swell so much that it’s difficult to open.

One important distinction: with preseptal cellulitis, once the swollen eyelid is opened, vision and eye movement remain normal, and the eye itself doesn’t bulge forward. If you notice vision changes, pain with eye movement, or the eye pushing outward, that suggests a deeper infection behind the eye (orbital cellulitis), which is a medical emergency. Preseptal cellulitis itself also needs prompt medical treatment, but it rarely threatens vision when caught early.

Preventing Styes From Coming Back

If you’ve had one stye, you’re more likely to get another, especially if the underlying cause hasn’t changed. A few specific habits make a real difference:

  • Wash your hands before touching your face, your eyes, or your contact lenses.
  • Clean your eyelids regularly if you’re prone to blepharitis. A gentle wipe along the lash line with a warm, damp cloth each morning helps keep gland openings clear.
  • Replace eye makeup every three months and never share mascara or eyeliner. Remove all makeup before sleeping.
  • Follow strict contact lens hygiene. Use fresh solution every time, replace your lens case regularly, and never sleep in lenses unless they’re specifically designed for overnight wear.

For people with chronic blepharitis or rosacea, managing the underlying condition is the most effective way to reduce stye frequency. This may involve daily eyelid hygiene routines, warm compresses as a preventive measure, or treatments prescribed by an eye care provider to improve oil gland function over time.