How Do You Get Styes in Your Eye? Causes Explained

Styes form when bacteria, almost always Staphylococcus aureus, infect one of the tiny oil glands or hair follicles along your eyelid margin. The infection creates a small, painful abscess that looks like a pimple or boil right at the edge of your eyelid. Most styes last one to two weeks and resolve on their own, but understanding what causes them can help you avoid repeat episodes.

What Happens Inside Your Eyelid

Your eyelids contain several types of glands that produce oils to keep your eyes lubricated. Along the lash line, small sebaceous glands (called glands of Zeis) open directly into each eyelash follicle. Deeper inside the eyelid, larger oil glands (called meibomian glands) run vertically through the eyelid’s firm tissue and release oils onto the surface of your eye with every blink.

A stye starts when one of these glands gets blocked. Dead skin cells, dried oil, or other debris can clog the gland’s opening. Bacteria that normally live on your skin surface then colonize the trapped material, multiply, and trigger an infection. Your immune system responds with inflammation, which is what produces the redness, swelling, and tenderness you feel.

External vs. Internal Styes

Most styes are external. They develop at the base of an eyelash when the small oil glands along the lash line become infected. You’ll typically see a small yellowish bump surrounded by redness and swelling right at the eyelid edge.

Internal styes are less common. These form when one of the larger oil glands deeper inside the eyelid gets infected. Instead of a visible bump on the outside, the swelling appears on the inner surface of the eyelid, facing the eyeball. Internal styes tend to be more painful because they press against the eye itself.

A related but distinct condition, called a chalazion, looks similar but isn’t caused by infection. A chalazion forms when one of those deeper oil glands gets blocked without bacteria being involved. The trapped oils irritate surrounding tissue, creating a firm, painless lump that can linger for weeks or months. Styes, by contrast, stay painful and localized to the eyelid margin.

Common Risk Factors and Triggers

Anything that introduces bacteria to your eyelid or blocks your oil glands raises your risk. The most common triggers are everyday habits you might not think twice about.

  • Touching your eyes with unwashed hands. Your fingers carry staph bacteria from surfaces throughout the day. Rubbing your eyes transfers those bacteria directly to the lash line.
  • Old or shared eye makeup. Bacteria grow in mascara, eyeliner, and eyeshadow over time. Stanford Health Care recommends replacing eye makeup, especially mascara, at least every six months. Sharing brushes or applicators spreads bacteria between people.
  • Sleeping in contact lenses or handling them with dirty hands. Both increase the amount of bacteria near your eyelid glands.
  • Not removing makeup before bed. Leftover cosmetics can clog the oil gland openings along your lash line overnight, creating the blocked environment bacteria thrive in.
  • Chronic eyelid inflammation (blepharitis). This ongoing condition causes flaky, irritated eyelid margins and makes gland blockages more frequent. If you get styes repeatedly, blepharitis is one of the most likely underlying causes.

Ocular rosacea, a condition where rosacea affects the eyes, is also linked to recurrent styes and eyelid infections. Adults develop styes more often than children, likely because of changes in oil composition and higher rates of chronic eyelid conditions like blepharitis and rosacea. Men and women are equally affected, and there’s no known racial predisposition.

Why Some People Get Styes Repeatedly

A single stye is usually just bad luck: the wrong bacteria met a blocked gland at the wrong time. But if you’re getting styes several times a year, something ongoing is probably keeping your eyelid glands irritated or prone to blockage.

Blepharitis is the most common culprit. It creates a cycle where inflamed eyelid margins produce thicker, stickier oils that are more likely to clog glands, which then become easier targets for bacterial infection. Treating the underlying blepharitis with daily eyelid hygiene (warm compresses and gentle lid scrubs) often breaks the cycle and reduces stye frequency. Ocular rosacea follows a similar pattern, and managing the rosacea itself helps prevent recurring eye infections.

Hormonal factors may also play a role. Higher androgen levels increase the thickness of the oils your eyelid glands produce, making blockages more likely. This partly explains why styes are more common in adults than children.

How a Stye Typically Progresses

Most styes follow a predictable pattern. You’ll first notice a tender spot on your eyelid, often with slight swelling. Over the next day or two, a small bump forms and the area becomes more red and swollen. The bump may develop a visible white or yellowish head as pus collects.

Within a week or two, the stye usually drains on its own and heals without treatment. Applying a clean, warm compress for 10 to 15 minutes several times a day speeds this process by softening the blocked oils and encouraging the gland to open. Resist the urge to squeeze or pop a stye, as this can spread the infection to surrounding tissue.

When a Stye Becomes Something More Serious

Styes are overwhelmingly harmless, but in rare cases the infection can spread beyond the gland into the surrounding eyelid tissue, a condition called preseptal cellulitis. Signs that a stye has progressed include swelling that spreads across the entire eyelid, significant worsening redness, or fever.

More concerning is when infection spreads behind the eye into the orbit. Warning signs include changes in vision (blurriness or double vision), difficulty moving the eye, or the eye appearing to push forward. These symptoms need immediate medical attention, as orbital cellulitis requires aggressive treatment to prevent permanent damage.

For the vast majority of styes, none of this applies. A warm compress, clean hands, and a little patience are all you need.