A stye forms when bacteria infect one of the tiny oil or sweat glands along your eyelid margin. The culprit is almost always Staphylococcus aureus, a bacterium that naturally lives on your skin and eyelashes. When it gets trapped inside a blocked gland, it triggers a localized infection that swells into the painful, red bump you recognize as a stye.
How the Infection Starts
Your eyelids contain dozens of small glands that produce oils and moisture to protect the surface of your eye. Along the lash line, sebaceous glands coat each eyelash follicle with oil, while sweat glands sit just behind them. Deeper inside the eyelid, a row of larger oil-producing glands lines the inner surface closest to the eyeball.
Staphylococcus aureus bacteria are present on most people’s skin without causing problems. Trouble begins when dead skin cells, dried oil, or debris plug one of these gland openings. Bacteria that would normally wash away with blinking and tears instead get sealed inside, where they multiply in the warm, oily environment. Your immune system responds by flooding the area with white blood cells, creating the swelling, redness, and pus-filled pocket that defines a stye.
S. aureus is particularly good at this kind of infection. It produces surface proteins that help it stick to tissue, along with toxins that break down the barriers between cells and kill off the immune cells your body sends to fight it. One key toxin punches holes in cell membranes, causing cells to burst. Others specifically target neutrophils, the first-responder immune cells that rush to the site. This is why styes can be surprisingly painful and inflamed for their small size.
External vs. Internal Styes
An external stye appears at the base of an eyelash, right along the lid margin. It involves the small oil glands or sweat glands that sit near the surface. These are the most common type, and they look like a pimple on the edge of your eyelid.
An internal stye develops deeper inside the eyelid, in the larger oil glands embedded in the eyelid tissue itself. These glands (called meibomian glands) produce the oily layer of your tear film. An internal stye tends to be more painful because it’s pressing against the eyeball, and you may only see it if you gently flip the eyelid. Internal styes are also more likely to linger and develop into a chalazion, a firm, painless lump that forms when the blocked gland 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 and crusty, is one of the strongest risk factors for recurrent styes. When the eyelid margin is already irritated, gland openings are more prone to clogging. Meibomian gland dysfunction, where the deeper oil glands produce thicker, waxier secretions that don’t flow properly, creates a similar setup. Both conditions give bacteria more opportunities to get trapped and multiply.
Rosacea
People with rosacea, particularly the form that affects the eyes (ocular rosacea), are significantly more prone to styes. Ocular rosacea causes blocked eyelid glands, chronic eyelid inflammation, and recurrent eye infections. In fact, recurring styes are one of the hallmark signs of ocular rosacea. If you get styes frequently and also have facial redness or flushing, the two may be connected.
Hormones and Age
Styes are more common in adults than in children. Higher levels of androgenic hormones in adults increase the thickness and stickiness of the oils produced by eyelid glands, making blockages more likely. Adults also have higher rates of blepharitis and rosacea, compounding the risk.
Makeup and Contact Lenses
Old eye makeup is a surprisingly effective bacteria delivery system. Eyelashes naturally carry bacteria, and every time a mascara wand or eyeliner pencil touches your lash line, it picks up those bacteria and deposits them back into the product container. Over time, the bacterial load in the cosmetic builds up. Experts recommend replacing eye makeup every three to four months to reduce infection risk. Sharing eye cosmetics is another common route, since it transfers bacteria between people.
Contact lens wearers face added risk when they handle lenses without washing their hands first, sleep in lenses not designed for overnight wear, or reuse old contact lens solution. Each of these habits introduces bacteria to the eyelid area or creates conditions where glands are more likely to clog.
Touching Your Eyes
This is the simplest and most common cause. Rubbing your eyes with unwashed hands transfers Staphylococcus bacteria directly to your eyelid glands. If you tend to rub your eyes when tired or during allergy season, you’re increasing your exposure every time.
How a Stye Heals
Most styes resolve on their own within one to two weeks. The bump gradually comes to a head, drains, and shrinks. Warm compresses are the primary way to speed this along. Holding a clean, warm cloth against the closed eyelid softens the blocked oil, encourages the gland to open, and increases blood flow to the area so your immune system can clear the infection faster.
During healing, avoid squeezing or popping the stye. Forcing it open can push the infection deeper into the eyelid tissue or spread bacteria to adjacent glands, potentially causing multiple styes at once.
When a Stye Becomes Something More Serious
A stye that doesn’t drain or shrink after two weeks may harden into a chalazion. Chalazia are painless but can persist for months and sometimes need to be drained by a doctor if they don’t resolve with warm compresses.
Rarely, the infection can spread beyond the gland into the surrounding eyelid skin, a condition called preseptal (periorbital) cellulitis. The eyelid becomes diffusely swollen and red rather than having a single focal bump. This requires antibiotic treatment. The most concerning scenario is when infection crosses deeper into the eye socket itself, causing orbital cellulitis. Warning signs include a noticeable drop in vision, pain when moving the eye, the eye bulging forward, fever, or pupils that respond unevenly to light. Orbital cellulitis is rare, but it is a medical emergency that can threaten both vision and overall health.

