What Causes Styes in Your Eyes and How to Prevent Them

Styes are caused by bacterial infection of the tiny oil glands along your eyelid margin. The culprit is almost always Staphylococcus aureus, a common bacterium that lives on skin and can multiply rapidly when it gets trapped inside a blocked gland. The result is a small, painful abscess that looks like a pimple on or near your lash line.

Understanding what triggers that blockage in the first place can help you avoid repeated styes and recognize when a bump on your eyelid needs more attention.

How a Stye Forms

Your eyelids contain dozens of small oil glands whose job is to coat the surface of your eye with a thin layer of lubrication every time you blink. These glands drain through narrow ducts that open near your eyelashes. When dead skin cells, dried oil, or other debris clogs one of those ducts, bacteria that are already present on the skin can get trapped inside. They multiply in the warm, moist environment, and your immune system responds with inflammation. That’s the red, swollen, tender bump you see.

There are two types, depending on which gland is affected. External styes form in the smaller oil or sweat glands right at the base of an eyelash (the glands of Zeis or Moll). These are the most common and sit visibly on the eyelid’s edge. Internal styes develop deeper in the eyelid, in the larger meibomian glands embedded in the firm tissue of the lid itself. Internal styes tend to be more painful because they press against the eyeball, and they’re less likely to drain on their own.

Risk Factors That Trigger Styes

Blepharitis

The single biggest risk factor for recurring styes is blepharitis, a chronic, low-grade inflammation of the eyelid margins. It causes redness, thickening, and a buildup of crusty scales along the lash line. That debris is exactly what blocks the gland ducts and sets the stage for infection. If you notice flaky, irritated eyelids between stye episodes, blepharitis is likely the underlying issue.

Touching Your Eyes

Staph bacteria live on your hands. Rubbing your eyes, especially after touching your nose or mouth (where staph colonies are densest), transfers bacteria directly to the vulnerable gland openings on your lash line. This is one of the most preventable causes.

Old or Shared Makeup

Every time a mascara wand or eyeliner pencil touches your lashes and then goes back into the tube, it can carry bacteria with it. Over weeks and months, the product itself becomes a reservoir. Old makeup is particularly risky because bacteria have had more time to grow. Mascara and liquid eyeliner should be replaced every four months. Solid eye pencils last up to a year. Sharing eye makeup with others multiplies the risk, because you’re introducing unfamiliar bacterial strains to your eyelids.

Contact Lens Habits

Handling contact lenses with unwashed hands, sleeping in lenses not designed for overnight wear, or wearing disposable lenses past their recommended lifespan all increase the bacterial load around your eyes. Proper disinfection and timely replacement lower the risk significantly.

Skin Conditions

Rosacea, a condition that causes facial flushing and visible blood vessels, has a notable connection to styes. A study comparing over 200 people who had styes in childhood with controls found that childhood stye sufferers were more than three times as likely to develop rosacea as adults (5.5% vs. 1.5%). Rosacea often involves the eyelids (a form called ocular rosacea), which promotes the same kind of chronic inflammation and gland dysfunction that leads to styes. Seborrheic dermatitis, which causes dandruff-like flaking, can also contribute when it affects the eyebrows and lash area.

Stye vs. Chalazion

Not every bump on the eyelid is a stye. A chalazion forms when a meibomian gland gets blocked but doesn’t become actively infected. Instead of a painful abscess, you get a firm, generally painless lump that sits farther back on the eyelid. A stye is very painful, appears at the eyelid’s edge, and usually involves an infected eyelash root. A chalazion can start as a stye that never fully drains, so the two conditions overlap. The key difference is pain: if the bump hurts, it’s more likely a stye. If it’s a hard, painless nodule, it’s probably a chalazion.

How Long Styes Last

Most styes resolve on their own within one to two weeks. The bump fills with pus, eventually comes to a head, and drains. You can speed this along with warm compresses. Research shows it takes two to three minutes of sustained warmth on the eyelid surface to liquefy the hardened oil inside a blocked gland. Most ophthalmologists recommend applying a warm, clean washcloth for about five minutes at a time, two to four times per day. Don’t squeeze or pop a stye. Forcing it open can push bacteria deeper into the tissue.

If pain and swelling haven’t started improving after 48 hours of warm compresses, it’s worth seeing an eye doctor. They can make a small incision under local anesthesia to drain the stye in a few minutes.

When a Stye Becomes Serious

Styes rarely cause complications, but when they do, the concern is that infection spreads into the surrounding skin. This is called preseptal (periorbital) cellulitis. The signs are swelling and redness that extend beyond the bump itself, spreading across the eyelid or around the eye, with the skin feeling warm and tender to the touch. Preseptal cellulitis is treatable with oral antibiotics and typically doesn’t affect vision.

The more dangerous scenario is when infection moves past the thin tissue barrier (the septum) separating the eyelid from the eye socket. This is orbital cellulitis, and it’s a medical emergency. Warning signs include fever, eye pain, vision changes, and the eyeball appearing to bulge forward. This distinction matters most in children, whose thinner tissue barriers make deeper spread more likely. If you notice any of these signs, go to the emergency room.

Preventing Recurring Styes

If you’ve had one stye, you’re more likely to get another, especially if the underlying trigger hasn’t changed. A few habits make a real difference. Wash your hands before touching your face or handling contact lenses. Clean your eyelids daily if you’re prone to blepharitis: a gentle wipe along the lash line with a warm, damp washcloth or a commercially available lid scrub removes the debris that blocks gland openings. Replace eye makeup on schedule, and never share mascara, eyeliner, or eye shadow applicators. If you wear contacts, follow the replacement schedule and clean them properly each night.

For people with rosacea or chronic blepharitis, treating the underlying condition is the most effective way to reduce stye frequency. These are long-term management issues rather than things you can fix once, but consistent eyelid hygiene keeps flare-ups to a minimum.