What Causes a Stye? Bacteria, Risk Factors & More

A stye is caused by a bacterial infection in one of the tiny oil or sweat glands along your eyelid margin. The bacterium responsible is almost always Staphylococcus aureus, a common organism that naturally lives on your skin and around your eyes. When it gets trapped inside a blocked gland, it multiplies, triggers inflammation, and produces the painful red bump you recognize as a stye.

How the Infection Starts

Your eyelids contain dozens of small glands that keep your eyes lubricated. Oil glands sit at the base of each eyelash, and larger oil glands are embedded deeper in the eyelid itself, producing the lipid layer of your tear film. Sweat glands also cluster near the lash follicles. Any of these can become a stye if bacteria get inside and the opening gets blocked.

S. aureus doesn’t have to come from somewhere unusual. Specific strains found in the normal flora around your eye are the same ones that cause the infection. Research on ocular S. aureus infections has shown that the bacteria isolated from eye infections match those already living in the patient’s surrounding skin. In other words, the culprit is already there, waiting for an opportunity.

That opportunity comes when a gland’s opening gets clogged by dead skin cells, dried oil, or debris. Bacteria that would normally wash away with tears instead get sealed inside, where they multiply and form a small abscess. Within one to two days, the bump localizes to a specific spot on the eyelid margin. Within two to four days, it typically ruptures on its own and drains, relieving pain and resolving the stye.

External vs. Internal Styes

Not all styes form in the same place, and the location affects how they feel and how quickly they heal.

An external stye develops at the base of an eyelash, involving the small oil glands or sweat glands right at the lash line. It looks like a pimple on the outer edge of your eyelid, and because it’s close to the surface, it tends to come to a head and drain relatively quickly.

An internal stye forms deeper in the eyelid, in the larger oil glands embedded within the firm tissue (called the tarsal plate) that gives your eyelid its shape. These glands are responsible for producing the oily layer that keeps your tears from evaporating too fast. An internal stye is often more painful and less visible from the outside, sometimes appearing as a red, swollen area on the inner surface of the eyelid. Because it’s deeper, it can take longer to resolve and is more likely to turn into a chalazion, a painless but persistent lump caused by a blocked gland that becomes chronically inflamed rather than actively infected.

Risk Factors That Make Styes More Likely

Chronic Eyelid Inflammation

Blepharitis, a condition where the eyelid margins stay chronically inflamed, is one of the strongest risk factors. When your eyelid margins are irritated and flaky, the gland openings are more prone to clogging, giving bacteria a consistent foothold. People with blepharitis often get styes repeatedly rather than as a one-time event.

Rosacea

Rosacea doesn’t just affect your cheeks and nose. When it involves the eyes, a form called ocular rosacea, it causes dryness, gritty sensations, and frequent styes. More active cases present with visible inflammation along the lid margin, dilated blood vessels on the eyelids, and recurring bumps. If you get styes often and also have facial redness or flushing, ocular rosacea may be an underlying driver.

Old or Shared Makeup

Eye makeup is a surprisingly effective vehicle for bacteria. Studies analyzing large samples of used cosmetics have found contamination rates between 70% and 90%, with expired products carrying the highest levels of microbial growth. Mascara wands and eyeliner pencils make direct contact with the lash line, depositing bacteria right where gland openings are most vulnerable. Sharing eye makeup multiplies the risk because you’re introducing someone else’s bacterial strains to your eyelid flora.

Contact Lens Habits

Handling contact lenses is a major source of bacterial transfer to the eye area. The most common pathway involves organisms moving from your hands to the lens during insertion or removal. Skipping hand washing before touching your lenses, skipping the rinse step before insertion, or letting lenses sit in a dirty storage case all increase contamination. Bacteria that aren’t destroyed by the disinfecting solution can multiply in a static lens case over time, creating a reservoir that recontaminates your lenses every time you use them.

Touching Your Eyes

This is the simplest and most common cause. Rubbing your eyes with unwashed hands transfers bacteria directly to your eyelid margin. If you have a habit of rubbing your eyes when you’re tired or when allergies flare up, you’re giving S. aureus repeated chances to enter a gland opening.

Stye vs. Chalazion

People often confuse styes with chalazia because both appear as lumps on the eyelid. The key difference is infection. A stye is an active bacterial infection: it’s red, tender, and warm, and it develops quickly over a day or two. A chalazion is a blocked oil gland that becomes inflamed but not infected. It tends to develop more slowly, feels firm rather than acutely painful, and can linger for weeks or months.

A stye can turn into a chalazion. If the infection clears but the gland remains blocked, you’re left with a painless lump of trapped oil and inflammation. Warm compresses applied for five to ten minutes, two or three times a day, help both conditions by softening the clogged material and encouraging drainage.

Why Some People Get Styes Repeatedly

A single stye is usually just bad luck: a gland got blocked, bacteria got in, and your body dealt with it. Recurrent styes point to something ongoing. The most common culprits are untreated blepharitis, ocular rosacea, or habitual behaviors like eye rubbing or poor contact lens hygiene. Hormonal changes and stress can also alter the composition of the oils your eyelid glands produce, making them thicker and more likely to clog.

If you’re getting styes more than once or twice a year, it’s worth looking at the pattern. Are you using expired makeup? Sleeping in contacts? Skipping lid hygiene? Addressing the underlying cause, whether it’s a skin condition or a daily habit, is more effective than treating each stye individually as it appears.