How Are Styes Formed? Causes and Risk Factors

A stye forms when one of the tiny glands in your eyelid gets blocked and then infected by bacteria, almost always Staphylococcus aureus, which causes 90% to 95% of cases. The blockage traps oil or sweat inside the gland, bacteria multiply in that trapped material, and your immune system responds with inflammation. The result is a painful, red, pus-filled bump that typically develops over a few days.

The Glands Behind Stye Formation

Your eyelids contain several types of glands packed into a very small area, and any of them can become the starting point for a stye. Along the lash line, oil glands (called Zeis glands) and sweat glands (called Moll glands) open into the tiny hair follicles of your eyelashes. Deeper inside the eyelid, larger oil-producing glands (meibomian glands) release oils that form the outer layer of your tear film and keep tears from evaporating too quickly.

When any of these glands becomes obstructed, whether from dead skin cells, dried oil, makeup residue, or inflammation, the stage is set for infection.

How the Infection Develops Step by Step

Staphylococcus aureus bacteria live on skin surfaces naturally, including your eyelids, without causing problems most of the time. The trouble starts when a gland duct gets blocked. Oil or sweat that would normally drain freely gets trapped, creating a warm, sealed environment where bacteria thrive.

As bacteria colonize the blocked gland, your immune system sends white blood cells to fight the infection. This immune response causes the hallmark redness, swelling, and tenderness. Pus collects in the center of the swelling as dead bacteria and white blood cells accumulate, often visible as a yellow or white point on the bump. Most styes progress to form a small abscess that either drains on its own or resolves with warm compresses, typically within about a week.

External vs. Internal Styes

Not all styes look or feel the same, and the difference comes down to which gland is affected. An external stye develops in an oil or sweat gland right at the base of an eyelash. These are the ones you can usually see as a small, obvious bump along the edge of your eyelid. They tend to come to a head and drain relatively quickly.

An internal stye forms in the larger oil glands embedded deeper within the eyelid tissue. These styes point inward, toward the surface that touches your eye. They can be harder to see from the outside and sometimes feel more like generalized eyelid swelling. Internal styes may take longer to resolve because the infection is deeper and less likely to drain on its own.

Common Triggers and Risk Factors

Anything that introduces bacteria to your eyelids or blocks those tiny gland openings raises your risk. Some of the most common triggers are everyday habits:

  • Sleeping in makeup. Leftover mascara, eyeliner, or foundation can block glands and follicles overnight, leading to inflammation and eventual stye formation.
  • Expired cosmetics. Over time, makeup products lose their consistency and become a breeding ground for bacteria. Replace mascara every three months, eyeliner every six months, and eyeshadows at least once a year.
  • Lining the waterline. Applying eyeliner to the inner rim of your eyelid directly blocks the gland openings there.
  • Dirty hands. Touching or rubbing your eyes without washing your hands first transfers bacteria straight to your eyelids.
  • Shared makeup. Sharing mascara, eyeliner, or brushes is a direct route for bacteria to spread from person to person.
  • Dirty brushes and tools. Makeup brushes and sponges should be washed with gentle soap and warm water at least once a week.

Beyond daily habits, certain chronic conditions make styes more likely to recur. Blepharitis, a condition where the eyelid margins stay chronically inflamed, is one of the most common. People with ocular rosacea frequently present with recurrent styes as an early sign of ongoing inflammation. If you keep getting styes despite good hygiene, an underlying condition like one of these could be the reason.

Stye vs. Chalazion

A stye is sometimes confused with a chalazion, but the two form through different processes. A stye is an active bacterial infection: it hurts, it develops quickly (over days), and it contains pus. A chalazion is not caused by bacteria. It develops slowly when an oil gland stays inflamed or blocked for a long time, and the trapped oil hardens into a firm, painless lump. Chalazia typically appear on the inner part of the eyelid and can take weeks or even months to resolve on their own.

A simple way to tell them apart: if pressing on the bump causes pain, it is likely a stye. If it does not hurt even with pressure, it is probably a chalazion. Styes can sometimes turn into chalazia if the infection clears but the blocked gland does not fully drain.

When a Stye Becomes Something More Serious

Most styes are harmless and self-limiting. Rarely, the infection can spread beyond the gland into the surrounding eyelid tissue, causing a condition called periorbital cellulitis. This typically presents with sudden, significant redness and swelling that extends well beyond the original bump, usually affecting one eye.

Red flags that suggest the infection is spreading include swelling that covers most of the eyelid or extends to the skin around the eye, pain with eye movement, the eye appearing to bulge forward, or difficulty moving the eye normally. These symptoms require prompt medical attention because untreated periorbital cellulitis can progress to deeper infections affecting the eye socket.

How to Help a Stye Resolve

The primary home treatment is a warm compress: a clean washcloth soaked in warm water, held against the closed eyelid for 10 to 15 minutes, several times a day. The heat helps loosen the blocked material in the gland and encourages the stye to drain naturally. Gently massaging the area after applying warmth can also help.

Resist the urge to squeeze or pop a stye. Forcing it can push the infection deeper into the eyelid tissue or spread bacteria to nearby glands. If a stye has not improved after a week of warm compresses, or if swelling is getting worse rather than better, a doctor may need to drain it with a small incision or prescribe treatment to address the infection.