What Causes a Stye on the Eye: Signs and Treatment

A stye is caused by a bacterial infection in one of the small glands or hair follicles along your eyelid margin. The bacterium responsible is almost always Staphylococcus aureus, a common germ that lives on your skin and can cause trouble when it gets trapped in the wrong place. Understanding exactly how this happens, and what makes some people more prone than others, can help you avoid repeat episodes.

How a Stye Forms

Your eyelids contain dozens of tiny oil glands that keep your tears from evaporating too quickly. Each eyelash also has its own small oil gland at its root. When one of these glands gets clogged, oil backs up and creates a warm, enclosed environment where bacteria thrive. Staph bacteria, which normally live harmlessly on your skin, multiply inside the blocked gland and trigger an infection. The result is a red, painful bump that looks and feels a lot like a small boil.

There are two types. An external stye forms at the base of an eyelash follicle, right at the edge of your lid. This is the more common kind. An internal stye develops deeper inside the eyelid, in one of the larger oil-producing glands (called meibomian glands) that line the inner surface. Internal styes tend to be more painful because they press against the eyeball, but both types follow the same basic pattern: blockage first, then infection.

The Most Common Triggers

Anything that clogs your eyelid glands or introduces bacteria to the area raises your risk. The most frequent triggers fall into a few categories.

Touching your eyes with unwashed hands. Your fingers carry staph bacteria from doorknobs, phones, and other surfaces. Rubbing your eyes transfers those bacteria directly to your eyelash follicles and gland openings.

Old or shared eye makeup. Mascara and liquid eyeliner should be replaced every four months. Solid eye pencils can last up to a year. Beyond that, applicators that repeatedly touch both the product and your eyes create a cycle of bacterial transfer. Sharing eye makeup with someone else does the same thing.

Sleeping in contact lenses or handling them with dirty hands. The CDC recommends washing your hands thoroughly with soap and water, then drying them with a clean cloth before touching your lenses. Lens cases should be cleaned with solution after every use, stored upside down with the caps off, and replaced at least every three months. Skipping these steps lets bacteria accumulate on surfaces that sit directly against your eye.

Leaving eye makeup on overnight. Makeup residue blocks gland openings while you sleep, giving bacteria hours to multiply in a warm, sealed-off space.

Chronic Conditions That Increase Risk

Some people get styes repeatedly, and the reason often traces back to an ongoing eyelid condition rather than a single hygiene mistake.

Blepharitis, a chronic inflammation of the eyelid margins, is the most common underlying cause. It thickens the oily secretions in your eyelid glands, making them more likely to clog. If you notice persistent flaking, crusting, or irritation along your lash line, blepharitis may be the reason styes keep coming back.

Ocular rosacea is closely related. It affects the skin around your eyes and disrupts normal oil gland function in the eyelids. In fact, doctors sometimes describe ocular rosacea as meibomian gland dysfunction because the two overlap so heavily. People with ocular rosacea frequently develop both styes and chalazia (a related but non-infectious bump). If you have facial rosacea with redness, flushing, or visible blood vessels on your cheeks and nose, your eyes may be affected too.

Do Stress and Poor Sleep Play a Role?

Many people notice styes popping up during stressful periods or after stretches of poor sleep, and there’s a plausible biological explanation, even though no study has directly proven the link. Stress raises levels of hormones like norepinephrine, which breaks down into a compound that may actually attract bacteria to vulnerable areas of the body. A 2017 study identified this mechanism, though it wasn’t specific to styes.

Sleep deprivation weakens your immune system in a more straightforward way. It reduces the effectiveness of T cells, a type of white blood cell responsible for fighting infections. When your immune defenses dip, staph bacteria that normally stay in check on your skin surface can more easily cause an active infection in a blocked gland. So while stress and exhaustion aren’t direct causes, they create conditions where a stye is more likely to develop.

Stye vs. Chalazion

Not every eyelid bump is a stye. A chalazion forms when a blocked gland becomes inflamed but not actively infected. The key differences are straightforward: a stye is very painful and usually appears right at the eyelid’s edge, often centered around a specific eyelash. A chalazion is typically painless or only mildly tender, and it develops farther back on the eyelid. Chalazia also tend to grow larger and stick around longer. A stye that doesn’t resolve can sometimes turn into a chalazion once the acute infection fades but the blocked gland remains swollen.

What to Do When You Get One

Most styes resolve on their own within a week or two. The standard home treatment is a warm, wet compress applied to the closed eyelid for 5 to 10 minutes, 3 to 6 times a day. The heat softens the clogged oil and encourages the gland to drain naturally. Use a clean washcloth each time, and resist the urge to squeeze or pop the stye. Squeezing can push the infection deeper into the eyelid tissue.

While the stye is active, stop wearing eye makeup and avoid contact lenses if possible. If you were using mascara or eyeliner around the time the stye appeared, discard those products to avoid reintroducing bacteria.

Signs of a More Serious Problem

In rare cases, a stye can spread to the surrounding tissue and cause preseptal cellulitis, an infection of the eyelid skin and soft tissue. Warning signs include swelling so severe you can’t open your eye, significant warmth and redness spreading beyond the bump, and fever. As long as your eye itself looks white when you do manage to open the lid, and your vision and eye movement are normal, the infection is likely still confined to the eyelid surface.

If you notice pain when moving your eye, blurred or decreased vision, or the eyeball itself appears to be pushed forward, those suggest the infection has moved deeper into the eye socket. This is a different and more urgent condition called orbital cellulitis that needs immediate medical attention.