What Causes a Stye in the Eye? Triggers and Risk Factors

A stye is caused by a bacterial infection in one of the tiny oil glands or hair follicles along your eyelid margin. The bacterium responsible is almost always Staphylococcus aureus, a common germ that lives on skin and only causes problems when it gets trapped inside a blocked gland. Understanding how that blockage happens, and what makes some people more prone to it, can help you avoid repeat infections.

How a Blocked Gland Becomes a Stye

Your eyelids contain several types of small glands that produce oils to keep your eyes lubricated and your tears from evaporating too quickly. When one of these glands gets clogged, oil backs up inside it. That warm, stagnant environment is ideal for bacteria already living on your skin to multiply, triggering the red, painful bump you recognize as a stye.

The blockage itself starts when the oils your glands produce thicken or the duct lining sheds too many cells. This narrows the opening, traps secretions inside, and causes the duct to swell. Once bacteria colonize the blocked gland, your immune system responds with inflammation, and the characteristic tender lump forms within a day or two.

External vs. Internal Styes

Not all styes form in the same place, because your eyelids have different glands doing different jobs.

An external stye, the more common type, is an infection of one of the small oil glands (called glands of Zeis) that open directly into your eyelash follicles. These styes appear right along the lash line on the outer surface of the eyelid. They look and feel like a pimple, often with a visible white or yellow head.

An internal stye forms deeper in the eyelid, inside one of the larger oil glands embedded in the firm tissue of the lid itself. These glands produce the oily outer layer of your tear film. When one becomes infected, the bump points inward toward the eye rather than outward, and you may notice it more by feel than by sight. Internal styes tend to be more painful because of their location and can take longer to resolve.

Everyday Habits That Raise Your Risk

Anything that introduces bacteria to your eyelids or promotes gland blockage can set the stage for a stye. The most common behavioral triggers are straightforward hygiene issues:

  • Touching your eyes with unwashed hands. This is the simplest way to transfer staph bacteria from surfaces to your eyelid margin.
  • Old or shared eye makeup. Mascara, eyeliner, and eyeshadow accumulate bacteria over time. Replacing eye cosmetics every three months significantly cuts the risk.
  • Contact lens handling. Putting lenses in or taking them out without properly washing your hands, or skipping your cleaning and disinfecting routine, creates repeated opportunities for bacterial transfer.
  • Sleeping in makeup. Cosmetic residue can clog the tiny gland openings along your lash line overnight, when your eyes are closed and warm for hours.

Chronic Conditions That Cause Recurring Styes

If you keep getting styes, the cause is likely an underlying eyelid condition rather than a single moment of poor hygiene. Blepharitis, a chronic low-grade inflammation of the eyelid margins, is the most common culprit. It causes scaling, crusting, and debris along the lash line, which clogs gland openings and encourages bacterial overgrowth. People with blepharitis often cycle between styes and periods of relative calm.

Ocular rosacea is another frequent driver. This condition, related to the facial rosacea that causes skin redness and flushing, directly disrupts the oil glands in your eyelids. Healthcare providers sometimes describe it as meibomian gland dysfunction because the glands stop producing healthy oil. Symptoms include swollen, irritated lids, and a noticeable tendency toward styes. Seborrheic dermatitis, which causes flaky, oily skin on the scalp and face, can similarly affect the eyelid area and promote gland obstruction.

Stress, Sleep, and Immune Function

Many people notice styes popping up during stressful periods or after a stretch of poor sleep, and there’s a plausible biological reason for that. No study has directly proven that stress causes styes, but stress hormones can weaken your immune defenses, making your body less effective at keeping skin bacteria in check. Some ophthalmologists report that insufficient sleep and high stress are common patterns in patients with recurrent styes.

There’s also a more specific mechanism that may be at play. Research from 2017 found that certain stress hormones get converted into compounds that may actually attract bacteria to vulnerable areas of the body. So while stress alone won’t cause a stye, it can lower the threshold, making a blocked gland more likely to become infected rather than resolving on its own.

Who Gets Styes Most Often

Styes can happen at any age, but they aren’t evenly distributed across the population. A large Japanese study tracking eyelid procedures over nine years found two peak age ranges: children and young teens (ages 10 to 14) and adults in their 30s. Young women and teenage girls were somewhat more likely to need treatment than males in the same age groups, with a female-to-male ratio reaching 1.7 to 1 in the 20 to 24 age bracket. That pattern likely reflects a combination of hormonal changes affecting oil gland output and higher rates of eye makeup use.

A Stye vs. a Chalazion

A stye and a chalazion can look similar, but they develop differently and feel different. A stye is an active infection. It comes on quickly, is painful and tender from the start, and usually has visible redness and swelling concentrated around one spot on the lid.

A chalazion is a blocked gland that becomes inflamed but not necessarily infected. It tends to develop more slowly, often over weeks, and typically isn’t very painful once it forms. Chalazia feel like firm, round lumps and can grow larger than most styes. Sometimes a stye that doesn’t fully drain will leave behind a chalazion as the infection clears but the blockage remains. If a bump on your eyelid isn’t tender and has been there for more than a couple of weeks, it’s more likely a chalazion than a stye.

When a Stye Becomes Something More Serious

Most styes drain on their own within a week or so, but occasionally the infection spreads beyond the gland into the surrounding tissue. The condition this leads to, preseptal cellulitis, involves the soft tissue around the eye becoming swollen, warm, red, and tender across a wider area than a single bump. You may develop a fever, and the eyelid can swell so dramatically that it’s hard to open.

The key distinction is that with preseptal cellulitis, once you manage to open the eyelid, your vision and eye movement should still be normal and the eyeball shouldn’t be bulging forward. If vision is affected or the eye itself appears to be protruding, that suggests a deeper infection that needs urgent evaluation. Widespread eyelid swelling with fever after a stye warrants prompt medical attention regardless.