What Can Cause a Stye in the Eye and How to Prevent It

A stye is almost always caused by a bacterial infection in one of the tiny glands or hair follicles along your eyelid. The bacterium responsible in most cases is Staphylococcus aureus, a common germ that lives on skin and can slip into a blocked or irritated gland. But the infection itself is only the final step. What really matters is understanding why that gland got clogged or vulnerable in the first place.

How a Stye Forms

Your eyelids contain dozens of small oil-producing glands that help keep your tears from evaporating too quickly. When one of these glands gets blocked, oil backs up inside it. Bacteria that normally live harmlessly on your skin can then multiply in that trapped oil, triggering the red, painful lump you recognize as a stye.

There are two types, depending on which gland is involved. An external stye forms at the base of an eyelash, where a hair follicle or a small oil gland near the lash line becomes infected. This is the more common type. An internal stye develops deeper inside the eyelid, in one of the larger oil glands embedded in the eyelid tissue itself. Internal styes tend to be more painful and can take longer to resolve, though both types follow the same basic pattern of blockage followed by infection.

Blepharitis: The Most Common Underlying Cause

If you get styes repeatedly, chronic eyelid inflammation called blepharitis is the most likely culprit. Blepharitis causes the oil glands along your lash line to become thick and sluggish. Their secretions thicken and stagnate, eventually plugging the gland openings. You might notice crusty flakes at the base of your lashes, redness along the eyelid margin, or a gritty feeling in your eyes. Blepharitis doesn’t always cause obvious symptoms, though, so it can quietly set the stage for styes without you realizing it.

Skin Conditions That Raise Your Risk

Rosacea, the skin condition that causes persistent facial redness, has a well-documented connection to styes. When rosacea affects the eyes (a form called ocular rosacea), it causes recurrent eyelid infections including styes, chalazia, and conjunctivitis. The inflammation disrupts normal oil gland function in the eyelids, creating the same blockage-then-infection cycle. If you have rosacea on your cheeks, nose, or forehead and also get frequent styes, the two are likely related.

Other inflammatory skin conditions like seborrheic dermatitis can also contribute by increasing flaking and bacterial buildup around the eyelids.

Eye Makeup and Poor Hygiene Habits

Old or contaminated cosmetics are a surprisingly common trigger. Mascara wands, eyeliner pencils, and eyeshadow brushes collect bacteria every time they touch your skin, and that bacterial load grows over time. The FDA notes that eye-area cosmetics have a more limited safe lifespan than other products, and some industry experts recommend replacing mascara every three months. If mascara dries out, toss it. Adding water or saliva to revive it introduces bacteria directly into the product.

Sharing makeup multiplies the risk. Department store testers are particularly likely to be contaminated, since dozens of people use the same product. If you develop an eye infection, throw away any eye makeup you were using at the time.

Beyond cosmetics, touching your eyes with unwashed hands is one of the simplest ways to transfer staph bacteria to your eyelid glands. Sleeping in your makeup is another common culprit, since it gives bacteria hours of uninterrupted contact with your gland openings while debris blocks normal oil flow.

Stress, Sleep, and Your Immune System

No study has directly proven that stress causes styes, but the connection is plausible enough that many eye specialists consider it a real factor. The reasoning works on two levels. First, stress hormones may physically encourage bacterial growth. A 2017 study found that the stress hormone norepinephrine breaks down into a compound that can attract bacteria to vulnerable areas of the body. Second, chronic stress suppresses immune function, making it harder for your body to keep normal skin bacteria in check.

Sleep deprivation works through a similar mechanism. Poor sleep reduces the effectiveness of the immune cells responsible for fighting infection. There’s also a practical angle: when you’re exhausted, you’re less likely to remove your makeup before bed, less likely to wash your hands before rubbing your tired eyes, and more likely to skip the small hygiene steps that keep your eyelids clean.

Stye vs. Chalazion

Not every bump on your eyelid is a stye. A chalazion looks similar but forms differently and feels different. A stye is an active infection, so it’s very painful, red, and often has a visible pus spot at its center. It typically appears right at the eyelid’s edge near the lash line, and the swelling can sometimes spread across the entire eyelid. You might also notice light sensitivity, tearing, crustiness, or a scratchy sensation like something is stuck in your eye.

A chalazion is a blocked oil gland without an active infection. It forms farther back on the eyelid, usually isn’t painful (though it can be tender), and rarely causes the whole eyelid to swell. A large chalazion can press on the eyeball enough to blur your vision. Styes sometimes turn into chalazia once the infection clears but the blocked gland remains swollen.

When a Stye Becomes Something More Serious

Most styes drain on their own within a week or so. In rare cases, the infection can spread beyond the gland into the surrounding eyelid tissue, a condition called periorbital cellulitis. The warning signs are distinct: pain and swelling that spread across the entire eye socket rather than staying localized to one bump, along with fever. If the infection pushes deeper behind the eye, it can cause the eye to bulge, vision changes, and significant eye pain. This progression, called orbital cellulitis, is a medical emergency. Fever combined with worsening swelling around the eye, especially in a child, warrants an immediate trip to the emergency room.

Reducing Your Risk

Since most styes start with a blocked gland, the most effective prevention targets that first step. Warm compresses held against your closed eyelids for five to ten minutes soften the oil in your glands and help them drain normally. This is especially useful if you have blepharitis or a history of recurring styes. Gently cleaning your lash line with diluted baby shampoo or a commercial lid scrub removes the debris and bacterial buildup that contribute to blockages.

Replace eye makeup regularly, never share it, and always remove it before sleeping. Wash your hands before touching your eyes or handling contact lenses. If you have rosacea, treating the underlying condition with your dermatologist can reduce the frequency of eye-related flare-ups, including styes.