What Causes a Stye and How to Get Rid of One

A stye is caused by a bacterial infection in one of the tiny oil-producing glands along your eyelid. In 90% to 95% of cases, the specific bacterium responsible is Staphylococcus aureus, a common type that already lives on your skin. When one of these glands gets blocked, bacteria multiply inside, triggering the red, swollen, tender bump you see at your lash line or on the inner surface of your lid.

How a Stye Forms

Your eyelids contain dozens of small glands that produce oils to keep your eyes lubricated. An external stye develops when bacteria infect a gland at the base of an eyelash. An internal stye forms deeper in the lid, in a larger oil gland embedded in the eyelid’s firm tissue. In both cases, the sequence is the same: the gland’s opening gets clogged by debris, dead skin cells, or thickened oil, bacteria that normally live on the lid surface get trapped inside, and infection takes hold.

The blocked gland swells into a small abscess. That’s what produces the classic symptoms: a red, painful bump with localized tenderness, sometimes topped with a visible yellow or white point of pus. Most styes stay small and drain on their own within a week or so, but they can be quite uncomfortable while they last.

External vs. Internal Styes

An external stye (the most common type) infects a gland that opens directly into an eyelash follicle. You’ll typically see redness and swelling centered around the root of a single lash. An internal stye involves a deeper oil gland called a meibomian gland, and tends to point inward toward the inner surface of the eyelid rather than outward. Internal styes can be harder to see but often feel more uncomfortable because of their position against the eye.

It’s worth knowing the difference between a stye and a chalazion, since they look similar. A chalazion is a blocked meibomian gland that isn’t actively infected. It forms a firm, usually painless lump in the lid. A stye, by contrast, is tender, red, and inflamed because bacteria are actively multiplying inside. Sometimes a stye that doesn’t fully resolve turns into a chalazion once the infection clears but the blockage remains.

Risk Factors That Make Styes More Likely

Some people get styes once and never again. Others deal with them repeatedly. Several underlying factors can tip the odds.

Blepharitis. This is chronic, low-grade inflammation along the eyelid margins. It changes the consistency of the oils your lid glands produce, making them thicker and more likely to clog. Bacterial enzymes on the lid margin can also alter the composition of these oils, feeding a cycle of blockage and inflammation that sets the stage for styes.

Meibomian gland dysfunction. When the deeper oil glands in your eyelids aren’t working properly, their openings become chronically obstructed and the oils they produce grow more viscous. This creates an environment where bacteria thrive. Over time, the glands themselves can shrink and lose function, making the problem self-reinforcing.

Rosacea. People with rosacea, particularly the form that affects the eyes (ocular rosacea), develop frequent styes and chalazia. The ongoing inflammation characteristic of rosacea disrupts meibomian gland function. In children, recurrent chalazia and styes are actually considered a hallmark sign of pediatric ocular rosacea.

Touching your eyes. Rubbing your eyes with unwashed hands is one of the simplest ways to introduce extra bacteria to your lid margin. This is especially relevant if you wear contact lenses, since the repeated handling gives bacteria more opportunities to reach the glands.

Contaminated cosmetics. Eye makeup is a surprisingly effective breeding ground for bacteria. A study of shared cosmetic products found that 100% of in-use items tested were contaminated with bacteria, and about 19% harbored fungal growth. Eyeliners were among the most contaminated. Old mascara, eyeliner, and eyeshadow can introduce bacteria directly to the gland openings along your lash line every time you apply them. Replacing eye makeup every few months and never sharing it with others reduces this risk considerably.

Can You Catch a Stye From Someone?

Styes are not easily contagious. The bacteria that cause them already live on most people’s skin. In rare cases, the infection can spread through direct contact or by sharing towels and pillowcases with someone who has an active stye, but this is uncommon. Still, it’s a good habit to wash pillowcases regularly and avoid sharing face towels, especially if someone in your household has a stye.

What Helps a Stye Heal

The primary home treatment is a warm compress. Heat softens the thickened oils blocking the gland and encourages the stye to drain naturally. Research on the ideal temperature suggests that the surface of the compress against your eyelid should be around 45°C (113°F), warm enough to melt the waxy blockage but not so hot that it burns the delicate skin. A clean washcloth soaked in warm water works well. Hold it against the closed eye for 10 to 15 minutes, rewarming the cloth as it cools.

Resist the urge to squeeze or pop a stye. Forcing it open can spread the infection into surrounding tissue. If a stye doesn’t improve after a week of warm compresses, keeps growing, or starts affecting your vision, it may need to be drained by a doctor or treated with antibiotics.

When a Stye Becomes Something More Serious

Most styes are a nuisance, not a danger. But in uncommon cases, the infection can spread beyond the gland into the soft tissue around the eye, causing a condition called preseptal cellulitis. Warning signs include swelling that spreads well beyond the bump itself, significant redness across the entire eyelid, fever, or pain that worsens rather than gradually improves. This kind of spreading infection needs prompt medical treatment.

A stye that hardens into a painless lump after the redness and tenderness fade has likely become a chalazion. These can persist for weeks or months. Continued warm compresses sometimes resolve them, but larger or persistent chalazia may need a minor in-office procedure to drain.

Reducing Your Risk of Recurrence

If you get styes frequently, the cause is almost always an underlying lid condition rather than bad luck. Daily lid hygiene helps: gently cleaning your lash line with diluted baby shampoo or a commercial lid scrub removes the debris and bacterial buildup that leads to gland blockages. A brief warm compress each morning, even when you don’t have a stye, keeps the oil glands flowing freely.

Replace eye makeup on a regular schedule, ideally every three months for mascara and liquid eyeliner. Remove all eye makeup before bed. If you wear contact lenses, wash your hands thoroughly before handling them. For people with rosacea or chronic blepharitis, treating the underlying condition with the help of an eye doctor is often the most effective way to break the cycle of recurrent styes.