What Causes a Stye on Your Eyelid and How It Forms

A stye is a red, painful bump on the eyelid caused by a bacterial infection in one of the small oil glands or hair follicles along the lash line. The bacterium responsible is almost always Staphylococcus aureus, a common germ that lives on skin and can invade a blocked gland, triggering inflammation and pus buildup. Styes typically last one to two weeks and resolve on their own, but understanding what causes them helps you prevent recurrences.

How a Stye Forms

Your eyelids contain dozens of tiny oil glands that keep your tears from evaporating too quickly. When one of these glands gets clogged with dead skin cells, dried oil, or debris, bacteria that normally live harmlessly on your skin can multiply inside the blocked gland. The immune system responds with inflammation, and the result is that familiar tender, swollen bump.

Staphylococcus aureus carries an arsenal of proteins that help it stick to tissue, resist your immune defenses, and spread infection. These same traits make it effective at colonizing a plugged gland and turning a minor blockage into an active infection.

External vs. Internal Styes

Not all styes form in the same spot, and the type depends on which gland is affected. An external stye, the more common kind, develops at the base of an eyelash where small oil and sweat glands sit. It looks like a yellowish pustule right at the eyelid margin, often surrounded by redness and swelling. You may also notice tearing, light sensitivity, or the feeling of something in your eye.

An internal stye forms deeper in the eyelid, inside one of the larger oil glands (called meibomian glands) that line the inner surface. Internal styes tend to be more painful and less visible from the outside, with redness and swelling concentrated on the inner lid surface. Both types share the same underlying cause: a clogged gland plus bacterial infection.

Common Triggers and Risk Factors

Several everyday habits and conditions make styes more likely by either introducing bacteria to the eyelid or promoting gland blockages.

  • Touching your eyes with unwashed hands. This is the most straightforward route for transferring Staph bacteria to your eyelid glands.
  • Old or contaminated makeup. One study found that 90% of used makeup products harbor significant amounts of bacteria. Liquid and cream formulas are especially risky because moisture accelerates bacterial and mold growth. Mascara and liquid eyeliner should be replaced every six months. Pencil eyeliners last one to two years because the dry format is less hospitable to germs.
  • Sleeping in makeup. Leaving eye makeup on overnight gives bacteria hours of uninterrupted contact with your lash line and gland openings.
  • Contact lens habits. Handling lenses with dirty hands or wearing them longer than recommended introduces bacteria directly to the eye area.
  • Blepharitis. This chronic inflammation of the eyelid margins causes thickening and buildup of gland secretions, which plugs the gland openings and sets the stage for infection. It is one of the most common underlying causes of recurrent styes.

Chronic Conditions That Increase Risk

People with ocular rosacea, a form of rosacea that targets the eyes, develop styes more frequently. The condition causes ongoing eyelid inflammation and is closely linked to dysfunction of the meibomian glands, the same glands involved in internal styes. Swollen, irritated eyelids and recurring bumps are hallmark symptoms.

Diabetes also raises the risk. People with diabetes are more susceptible to bacterial infections in general, and styes are specifically listed among the common infections seen in this population. Elevated blood sugar impairs the immune system’s ability to fight off bacteria like Staph, so gland infections that a healthy immune system might prevent can take hold more easily. If you get styes repeatedly, it may be worth checking whether an underlying condition is contributing.

Stye vs. Chalazion

A chalazion looks a lot like a stye in the first day or two, but the two conditions diverge quickly. A stye stays painful and sits right at the eyelid margin, often with a visible pus-filled head near the lash line. A chalazion migrates toward the center of the eyelid body and becomes a firm, painless nodule. The key distinction is that a stye is an active infection, while a chalazion is a blocked gland that has become inflamed without significant bacterial involvement.

That said, a stye can sometimes evolve into a chalazion if the infection clears but the gland remains plugged. A chalazion that persists for weeks despite treatment should be evaluated, because in rare cases a persistent eyelid lump can indicate something more serious that requires a biopsy.

How Styes Heal

Most styes resolve within one to two weeks without medical intervention. The primary home treatment is a warm compress applied to the closed eyelid for about five minutes at a time, two to four times per day. Research shows it takes two to three minutes of sustained warmth to liquefy the hardened oil trapped inside the blocked gland, which is why brief applications of a few seconds don’t work. A clean washcloth soaked in warm water works well, though some people prefer a microwavable eye mask that holds heat longer.

Resist the urge to squeeze or pop a stye. Forcing it open can spread the infection to surrounding tissue. Let the warm compresses do the work of softening and draining the blockage naturally.

If pain and swelling haven’t started improving after 48 hours of consistent warm compresses, or if the bump gets worse after the first two to three days, it’s time for a professional evaluation. Other signals that warrant attention include pus or blood leaking from the bump, blisters forming on the eyelid, the eye swelling shut, eyelids that feel hot to the touch, or any change in vision. An eye doctor can drain a stubborn stye with a small procedure if needed.

Preventing Recurrences

If you’ve had one stye, you’re more likely to get another, especially if the underlying trigger hasn’t changed. A few practical steps reduce your risk significantly. Wash your hands before touching your face or handling contact lenses. Replace mascara and liquid eyeliner every six months, and throw out any eye product you used during an active infection. Remove all eye makeup before bed.

For people with blepharitis or ocular rosacea, daily eyelid hygiene becomes especially important. Gently cleaning the lash line with a warm washcloth or commercial lid scrub helps keep the gland openings clear of the crusting and debris that lead to blockages. Consistent daily warm compresses, even when you don’t have a stye, can keep oil flowing through the glands and prevent the thickening that starts the cycle over again.