A stye is caused by a bacterial infection in one of the tiny oil glands or hair follicles along your eyelid margin. The culprit is almost always Staphylococcus aureus, a common bacterium that naturally lives on your skin and around your eyes. When it gets trapped inside a blocked gland or follicle, it multiplies, triggering the painful red bump you recognize as a stye.
How the Infection Starts
Your eyelids contain dozens of small glands that produce oils to keep your eyes lubricated. Along the lash line, tiny glands associated with each hair follicle secrete oil that coats the base of your eyelashes. Deeper inside the eyelid, larger glands called meibomian glands release a lipid-rich secretion that forms the outer layer of your tear film, preventing tears from evaporating too quickly.
A stye forms when one of these glands gets clogged. Bacteria that are already part of your normal skin flora produce enzymes called lipases that break down the oils in these glands, releasing free fatty acids and cholesterol. These byproducts accumulate in the gland’s duct, worsening the blockage. The bacteria then thrive in this environment, and cholesterol released during the process actually stimulates further bacterial growth, creating a feedback loop. Your immune system responds by flooding the area with white blood cells, producing the swelling, redness, and pus that characterize a stye.
External vs. Internal Styes
Most styes are external. These form when an eyelash follicle or one of the small oil glands right at the lash line becomes infected. They appear as a visible bump on the outer edge of your eyelid, typically coming to a head like a small pimple within one to two days.
Internal styes are less common and develop when a meibomian gland deeper inside the eyelid gets infected. You may not see a bump on the outside of your lid. Instead, the pain and swelling concentrate on the inner surface of the eyelid. Internal styes tend to be more uncomfortable because they press against the eye itself.
Common Risk Factors
Anything that increases the chance of gland blockage or introduces bacteria to your eyelid raises your risk. The most common triggers are straightforward habits:
- Touching your eyes with unwashed hands. This transfers bacteria directly to the eyelid margin where glands are most vulnerable.
- Sleeping in old or shared eye makeup. Mascara and eyeliner can clog follicles and harbor bacteria, especially if products are expired or shared.
- Wearing contact lenses without proper hygiene. Handling lenses with dirty fingers or reusing solution creates opportunities for bacterial transfer.
- Incomplete makeup removal. Residue left along the lash line overnight blocks gland openings.
Stress and sleep deprivation don’t directly cause styes, but they weaken immune function enough that bacteria your body would normally keep in check can gain a foothold.
Chronic Conditions That Raise Your Risk
Some people get styes repeatedly, and that pattern often points to an underlying condition affecting the eyelid glands.
Blepharitis, a chronic inflammation of the eyelid margins, is the most significant risk factor. It causes thickening and stagnation of gland secretions, plugging the openings of oil glands along the lash line. If you notice persistent flaking, crusting, or irritation at the base of your eyelashes, blepharitis may be driving recurrent styes.
Rosacea, particularly when it affects the eyes, substantially increases the likelihood of eyelid problems. A large study across seven institutions found that people with rosacea were roughly 3.4 times more likely to have blepharitis than people without the condition. The association held across age groups and was actually stronger in people under 50, with about 4.5 times the odds. Women with rosacea also showed nearly four times the odds of developing chalazia (the non-infectious cousin of styes). If you have rosacea and get frequent styes, the two are likely connected.
Diabetes and other conditions that compromise immune function also make styes more frequent, since your body is less efficient at controlling the bacteria that live on your skin.
Styes vs. Chalazia
A chalazion looks similar to a stye but has a different cause. While a stye is an active bacterial infection, a chalazion is a non-infectious blockage of a meibomian gland. The trapped oil leaks into surrounding tissue and triggers a slow inflammatory reaction rather than an infection.
The easiest way to tell them apart is pain and location. A stye is painful from the start and localizes to the eyelid margin within a day or two. A chalazion typically becomes a small, firm, painless nodule in the body of the eyelid, away from the lash line. Styes often develop a visible whitehead; chalazia rarely do. A stye that doesn’t resolve can sometimes turn into a chalazion once the acute infection fades but the gland remains blocked.
How Long a Stye Lasts
Most styes resolve on their own within one to two weeks. Warm compresses are the standard home treatment: hold a clean, warm cloth against the affected eyelid for about five minutes at a time, two to four times per day, as recommended by the American Academy of Ophthalmology. The heat helps soften the blocked material inside the gland and encourages it to drain naturally. Resist the urge to squeeze or pop a stye, which can spread the infection to surrounding tissue.
During this time, avoid wearing eye makeup and contact lenses on the affected side. Keep the area clean, and wash your hands before touching anywhere near your eyes.
When a Stye Becomes Serious
Styes are almost always harmless, but in rare cases the infection can spread beyond the gland into the soft tissue around the eye. This condition, called preseptal (periorbital) cellulitis, causes diffuse swelling and redness across the entire eyelid rather than a single localized bump. If that infection spreads even deeper, past the thin tissue barrier that separates your eyelid from your eye socket, it becomes orbital cellulitis, which is a medical emergency.
Signs that warrant immediate care include fever alongside eye pain, swelling that spreads well beyond the original bump to involve the entire area around the eye socket, vision changes, or a bulging eye. These symptoms are particularly important to watch for in children, whose thinner tissue barriers make deeper spread more likely.
Preventing Recurrent Styes
If you get styes more than once or twice a year, daily eyelid hygiene can break the cycle. Gently cleaning your lash line each morning with a warm washcloth removes the debris and bacterial buildup that lead to gland blockages. Some people find that a diluted baby shampoo scrub or commercially available eyelid wipes work well for this.
Replacing eye makeup every three to six months limits bacterial contamination. Never share mascara, eyeliner, or eye shadow brushes. If you wear contact lenses, follow the replacement schedule precisely and always wash your hands before handling them.
For people with blepharitis or rosacea, managing the underlying condition is the most effective prevention. Regular warm compresses (even when you don’t have a stye) keep the oil glands flowing freely, and treating rosacea flares reduces the chronic eyelid inflammation that sets the stage for infection.

