Why You Get Styes in Your Eye and How to Prevent Them

Styes form when bacteria infect one of the tiny glands along your eyelid. Your eyelids contain dozens of oil-producing glands and sweat glands, and when one gets blocked, bacteria (most often Staphylococcus aureus) can multiply inside, triggering a painful, red bump. The process is similar to how a pimple forms on your skin, just in a more sensitive location.

What Happens Inside Your Eyelid

Your eyelids aren’t just flaps of skin. They’re lined with different types of glands that keep your eyes lubricated. Along the lash line, small oil glands (called Zeis glands) and sweat glands (called Moll glands) surround each hair follicle. Deeper inside the eyelid, larger oil glands produce the oily layer of your tear film that prevents tears from evaporating too quickly.

When any of these glands gets clogged with dead skin cells, dried oil, or debris, bacteria already living on your skin surface can colonize the blocked gland. Staph bacteria are the most common culprit. They produce enzymes called lipases that break down the oils in your eyelid into irritating byproducts, which fuels inflammation. Your immune system responds by sending white blood cells to the area, and the result is that familiar swollen, tender lump filled with pus.

External vs. Internal Styes

Not all styes look the same, and the difference comes down to which gland is involved. An external stye appears right at the base of an eyelash, originating from the smaller oil or sweat glands near the lash line. These are the ones you can usually see clearly as a yellow or white bump along the eyelid’s edge. When they drain, pus releases from the outer lash line.

An internal stye develops deeper inside the eyelid, in the larger oil glands embedded in the eyelid’s firm tissue. These are harder to see from the outside and tend to point inward, sometimes draining onto the inner surface of the eyelid rather than the outer skin. Internal styes can feel more like a deep, aching pressure than a surface-level pimple.

Styes vs. Chalazia

If your bump isn’t very painful, it might not be a stye at all. A chalazion looks similar but develops differently. While a stye is an active bacterial infection, a chalazion is a clogged oil gland without infection. It tends to form farther back on the eyelid, grows more slowly, and is firm rather than tender. A stye that doesn’t fully drain can sometimes turn into a chalazion as the inflammation becomes chronic rather than infectious. Chalazia that persist beyond one to two months sometimes need to be drained by a doctor.

Why Some People Get Styes More Often

Certain habits and conditions make styes more likely. The most common risk factors are things you can control.

  • Touching your eyes with unwashed hands. This transfers staph bacteria directly to your eyelid glands. Even rubbing your eyes when they’re itchy or tired introduces bacteria into small openings along the lash line.
  • Contaminated eye makeup. Research testing eye cosmetics before and after use found that contamination levels increase significantly over time. In one study, 100% of used eye shadow samples and 75% of mascara samples showed bacterial growth above safe thresholds. The primary bacteria found were the same staph species that cause styes and other eyelid infections. Shared applicators, unwashed brushes, and expired products all compound the risk.
  • Sleeping in contact lenses. Contacts can trap bacteria against the eye surface and disrupt the normal flow of oils from your eyelid glands.
  • Chronic blepharitis. This is ongoing low-grade inflammation of the eyelid margins. People with blepharitis have higher levels of staph bacteria colonizing their lash line, which makes recurrent styes far more likely.
  • Skin conditions like rosacea. Rosacea affects the oil glands throughout the face, including the eyelids, making blockages more frequent.

How a Stye Heals

Most styes resolve on their own within one to two weeks. They typically go through a predictable cycle: the bump appears and grows more painful over the first few days, reaches a peak where it may develop a visible white or yellow head, then either drains on its own or gradually reabsorbs.

Warm compresses are the single most effective thing you can do to speed this up. Placing a clean, warm cloth over the closed eyelid softens the hardened oil blocking the gland and encourages the stye to open and drain. Gently massaging or wiping the eyelid afterward helps clear the material. Doing this several times a day, for about 10 to 15 minutes each session, makes a noticeable difference in how quickly the stye resolves.

Resist the urge to squeeze or pop a stye. Forcing it open can spread the infection deeper into the eyelid tissue or into surrounding skin.

When a Stye Needs Medical Attention

Most styes are harmless, but in rare cases the infection can spread beyond the gland into the surrounding eyelid tissue, causing a condition called preseptal cellulitis. Signs that this is happening include swelling that extends well beyond the bump itself, redness spreading across the eyelid, fever, or worsening pain after several days. This type of spreading infection typically requires oral antibiotics for 7 to 10 days. If an abscess forms (a deeper pocket of pus), a doctor may need to drain it.

A stye that hasn’t improved at all after two weeks, or one that keeps coming back in the same spot, also warrants a visit to your eye doctor. Recurrent styes in the exact same location can occasionally signal a rare eyelid condition that needs evaluation.

Preventing Styes From Coming Back

If you’ve had one stye, the odds of getting another are higher, especially if the underlying cause (like blepharitis or a makeup habit) hasn’t changed. A daily eyelid hygiene routine makes the biggest difference for people prone to recurrence.

Washing your eyelids gently each morning and night removes the bacterial buildup and dried oils that set the stage for blockages. You can use a clean washcloth with warm water, or a dedicated eyelid cleanser. Hypochlorous acid sprays have become a popular option for daily lid hygiene. The solution is sprayed onto closed eyelids or a cotton pad and wiped gently around the lash line. People who deal with frequent styes often find that keeping this as a twice-daily habit, morning and night, significantly reduces how often they flare up.

For makeup users, the research on contamination suggests a few practical rules: replace mascara every three months, never share eye products, clean brushes and applicators regularly, and avoid applying liner to the inner rim of the eyelid (the waterline), where it can directly block gland openings. Washing your hands before touching your eyes or handling contacts is one of those simple habits that eliminates the most common way bacteria reach your eyelids in the first place.