What Causes Styes in the Eye and How to Prevent Them?

Styes are caused by a bacterial infection in the tiny oil glands along your eyelid margin. The bacterium responsible in most cases is Staphylococcus aureus, one of the most common bacteria living on human skin. When one of these oil glands gets blocked, the trapped secretions create a breeding ground for the bacteria, leading to the red, painful bump you recognize as a stye.

How a Stye Forms

Your eyelids contain dozens of small oil glands whose job is to coat your tears and keep them from evaporating too quickly. These glands open along the edge of your eyelid, right at the base of your eyelashes. When one of them gets clogged by dried oil, dead skin cells, or debris, the oil backs up inside the gland. Staphylococcus aureus, which normally lives harmlessly on your eyelid skin and lashes, takes advantage of the stagnant environment and multiplies. The result is a localized infection: swelling, redness, tenderness, and often a small yellowish pustule that forms near the lash line within a day or two.

You might also notice tearing, light sensitivity, or a feeling like something is stuck in your eye. These symptoms are typical and usually peak in the first couple of days before the stye begins to drain on its own.

External vs. Internal Styes

Not all styes form in the same spot, because the eyelid has different types of oil glands at different depths. An external stye, the more common type, develops in the smaller glands right at the eyelash base. It shows up as a visible bump on the outer edge of your lid. An internal stye forms deeper, in the larger oil glands embedded in the eyelid itself. Internal styes are rarer and tend to cause more intense swelling. They sometimes aren’t suspected unless the inflammation is severe or accompanied by fever or chills.

Common Triggers and Risk Factors

Anything that blocks those oil glands or introduces extra bacteria to the area raises your risk. Some of the most common triggers are everyday habits you might not think twice about.

  • Not removing makeup before bed. Eye makeup attracts dirt and bacteria throughout the day. Left on overnight, it can clog the oil glands along your lash line.
  • Using old cosmetics. As soon as a brush touches your eyelashes, it picks up bacteria. Over time, that bacteria multiplies inside the cosmetics container. Experts recommend replacing eye makeup every three to four months.
  • Sharing eye makeup. Using the same brushes or eyeliner as someone else transfers bacteria between people.
  • Touching your eyes with unwashed hands. Your hands carry bacteria that can easily migrate to the oil glands.
  • Skipping post-workout eyelid care. Sweat and excess oil from exercise can clog eyelid glands if you don’t wash your face and eyelids afterward.
  • Lash extensions. Extensions trap dirt and bacteria close to the oil gland openings, increasing the chance of blockage and infection.

People with a chronic condition called meibomian gland dysfunction are especially prone to recurring styes. In this condition, the eyelid’s larger oil glands consistently fail to secrete enough oil, or the oil they produce thickens and hardens, making blockages more frequent. Skin conditions like rosacea and chronic eyelid inflammation (blepharitis) also raise stye risk for similar reasons.

Stye vs. Chalazion

A stye and a chalazion can look identical in the first day or two, both starting as a painful, swollen spot on the eyelid. The difference is what’s happening underneath. A stye is an active bacterial infection. A chalazion is a blocked oil gland without infection, caused by hardened secretions rather than bacteria.

The two diverge within a couple of days. A stye stays painful, stays at the eyelid margin, and often develops a visible pus-filled head near the lash line. A chalazion migrates toward the center of the eyelid, becomes a firm, painless nodule, and tends to linger longer. If your bump stops hurting but doesn’t go away, it has likely transitioned into or was always a chalazion.

How Long Styes Last

Most styes resolve on their own within a few days to a week. Warm compresses are the standard home treatment: a clean, warm washcloth held against the closed eyelid for 10 to 15 minutes, several times a day. The heat softens the blocked oil and encourages the gland to drain. Gentle massage of the eyelid after the compress can help move things along.

If a stye hasn’t improved after a week of consistent warm compresses, it’s worth having it looked at. Some styes need to be drained by a doctor, and persistent bumps sometimes turn out to be chalazia that require different treatment.

When a Stye Becomes Something More Serious

In rare cases, the infection from a stye can spread beyond the gland into the surrounding eyelid tissue, a condition called preseptal cellulitis. Signs include redness and swelling that extend across the entire eyelid rather than staying focused in one spot, along with significant tenderness. The eye itself should still move normally and your vision should remain unchanged. If you notice vision changes, difficulty moving your eye, the eye pushing forward, or double vision, the infection may have spread deeper into the eye socket. That’s a medical emergency requiring imaging and immediate treatment.

Preventing Styes

Since styes start with clogged, bacteria-laden oil glands, prevention comes down to keeping your eyelids clean and those glands flowing freely. Wash your eyelids daily, especially if you wear makeup or have oily skin. Use a gentle cleanser or diluted baby shampoo along the lash line. Always remove eye makeup completely before sleep, and wash your hands before touching your eyes or applying cosmetics.

Replace mascara, eyeliner, and eyeshadow every three to four months, even if you haven’t finished the product. Don’t share eye cosmetics with anyone. Store them below 85°F (29°C), as heat weakens the preservatives that keep bacterial growth in check. And never add saliva to dried-out eye makeup to moisten it, as mouth bacteria can cause eye infections.

If you’re prone to recurring styes, a daily warm compress routine (even when you don’t have an active stye) can keep the oil glands from thickening and clogging. Think of it like flossing: the benefit is in the consistency, not in doing it once after a problem shows up.