How Do Eye Styes Form? Causes and Risk Factors

A stye forms when one of the tiny oil or sweat glands along your eyelid gets blocked and then infected, almost always by Staphylococcus aureus bacteria that already live on your skin. The blockage traps oil or debris inside the gland, creating a warm, sealed environment where bacteria multiply and trigger an inflammatory response. Within about a day of that process starting, a small, painful red bump appears on or inside the eyelid.

The Glands Behind the Infection

Your eyelids contain several types of glands packed into a surprisingly small space, and which gland gets blocked determines what kind of stye you develop. External styes form at the base of an eyelash, where two types of glands produce oil and sweat to keep the lash follicle lubricated. When one of these glands clogs, bacteria colonize the trapped material, and you get the classic red bump right along the lash line. These external styes sometimes develop a visible white or yellow pus spot at their center.

Internal styes form deeper in the eyelid, in the meibomian glands. These larger oil glands are embedded in the firm tissue (called the tarsal plate) that gives your eyelid its structure. Meibomian glands produce the oily outer layer of your tear film, and when one gets blocked, the resulting stye tends to be more painful because the swelling pushes against the inner surface of the lid. Internal styes drain toward the inside of the eyelid rather than outward at the lash line, so you may not see a pus spot, but you’ll feel a tender, swollen area when you press on the lid.

How Bacteria Get Involved

Staphylococcus aureus is the primary culprit. This bacterium is a normal resident of your skin and eyelids. In healthy eyes, it causes no problems. But studies of people with chronic eyelid inflammation found S. aureus in 46% to 51% of their cultures, compared to just 8% in people without eyelid problems. When a gland opening gets plugged by thickened oil, dead skin cells, or debris, the bacteria already sitting on the lid margin suddenly have a closed-off space to proliferate. The infection and your immune system’s response to it produce the redness, swelling, and pus that make a stye so uncomfortable.

The bacteria may cause damage both through direct toxins they release and by provoking an overreaction from your immune cells. This is why styes can swell far beyond the tiny gland that’s actually infected, sometimes puffing up the entire eyelid.

What Makes You More Prone to Styes

Some people get styes once and never again. Others deal with them repeatedly. The difference often comes down to underlying conditions or habits that keep eyelid glands chronically irritated or blocked.

Blepharitis, a persistent low-grade inflammation of the eyelid margins, is one of the biggest risk factors. It creates a cycle: the lid margins stay slightly irritated and colonized with excess bacteria, which makes gland blockages more likely, which leads to styes. Ocular rosacea works in a similar way. It’s sometimes described as meibomian gland dysfunction because the oil glands become chronically inflamed and produce thicker secretions that clog more easily. Styes and chalazia are listed among its most common complications.

Cosmetic habits matter too. Applying eyeliner or other makeup inside the lash line can physically block the gland openings, and old or shared makeup can introduce extra bacteria. The American Academy of Ophthalmology recommends always applying makeup outside the lash line to avoid sealing off these glands. Not removing makeup before bed, touching your eyes with unwashed hands, and using expired cosmetics all increase the odds of a blockage turning into an infection.

What a Stye Feels Like as It Develops

Most styes develop over a few days in a predictable pattern. It usually starts with a vague tenderness or a feeling like something is in your eye. Within about a day, a small bump appears. The area around it becomes red, swollen, and sensitive to touch. Your eye may water more than usual, and you might notice crustiness along the eyelid margin, especially in the morning. Light sensitivity is common.

Over the next few days the bump typically comes to a head. It either ruptures on its own and drains pus, or it gradually reabsorbs. Without any treatment, the whole process takes one to two weeks from start to finish. Warm compresses held against the closed lid for 10 to 15 minutes several times a day can speed things along by softening the clogged material and encouraging drainage.

Styes vs. Chalazia

People often confuse styes with chalazia because both are bumps on the eyelid, but they form differently and feel different. A stye is an acute infection: it’s red, painful from the start, and usually appears right at the eyelid’s edge near a lash. A chalazion is a blocked oil gland that becomes inflamed without an active bacterial infection. It tends to develop farther back on the lid, grows more slowly, and causes little or no pain at first. A chalazion may actually start as an internal stye that doesn’t fully drain. Instead of resolving, the trapped material hardens into a firm, painless nodule.

The key distinction is pain and location. If you have a sore, red bump near your lash line that appeared quickly, it’s most likely a stye. If you have a firm, mostly painless lump farther from the lash line that developed gradually, it’s more likely a chalazion. Chalazia rarely make the entire eyelid swell the way styes can, but if they grow large enough they can press on the eyeball and blur your vision.

When a Stye Becomes Something More Serious

Most styes are self-limiting annoyances. Rarely, the infection spreads beyond the gland and into the surrounding eyelid tissue, a condition called preseptal cellulitis. Signs include worsening tenderness, significant swelling and warmth across the entire eyelid, redness or a purplish discoloration of the skin, and sometimes fever. The swelling can become severe enough that you can’t open the eye.

The critical thing to know is that preseptal cellulitis stays in front of the eye’s bony socket. The eyeball itself remains white, vision stays normal, and the eye moves freely in all directions. If the eye itself looks red, if your vision changes, or if moving the eye hurts, those are signs the infection may have spread deeper into the orbit, which is a more urgent situation requiring imaging and aggressive treatment. Significant eyelid swelling with fever after a stye warrants prompt evaluation.

Keeping Eyelid Glands Clear

If you’re prone to styes, daily eyelid hygiene is the single most effective preventive step. Washing the eyelid margins with diluted baby shampoo, which ophthalmologists frequently recommend because it’s gentle and tear-free, helps remove the debris, dried oil, and bacterial buildup that seed new blockages. Warm compresses before washing can soften any thickened oil sitting in the glands.

Beyond hygiene, replacing eye makeup every few months, never sharing cosmetics, removing all makeup before sleep, and keeping your hands away from your eyes reduce the bacterial load on your lids. If you have an underlying condition like blepharitis or ocular rosacea, managing it consistently is the best way to break the cycle of recurrent styes.