A stye is caused by a bacterial infection in one of the tiny oil or sweat glands along your eyelid margin. The bacterium responsible is almost always Staphylococcus aureus, a common skin microbe that gets trapped inside a blocked gland and triggers a painful, red bump. Several everyday habits and underlying health conditions make these infections more likely.
How a Stye Forms
Your eyelids contain dozens of small glands that keep your lashes lubricated and your tear film stable. When one of these glands gets clogged by dead skin cells, dried oil, or debris, bacteria that normally live harmlessly on your skin can multiply inside the blocked opening. The result is a localized pocket of infection, essentially a tiny abscess, that swells into the red, tender bump you recognize as a stye.
There are two types, depending on which glands are involved. An external stye develops at the base of an eyelash, in the small oil glands or sweat glands right at the lash line. These are the most common kind and typically produce a visible yellowish pustule surrounded by swelling. An internal stye forms deeper in the eyelid, in the larger oil-producing glands embedded in the eyelid’s firm inner structure. Internal styes tend to be more painful and less visible from the outside, with redness and swelling concentrated on the inner surface of the lid.
The Bacteria Behind It
Staphylococcus aureus is the dominant cause. This bacterium colonizes the skin of most people without causing problems, but once it enters a clogged gland, it multiplies rapidly in the warm, oily environment. Your immune system responds with inflammation, sending white blood cells to the site, which produces the characteristic pus, redness, and pain. The infection stays localized, which is why styes almost always resolve on their own without spreading to other parts of the eye.
Common Triggers and Risk Factors
Anything that introduces bacteria to your eyelid margin or blocks those tiny glands increases your chances of developing a stye. The most common triggers are everyday habits you might not think twice about.
Touching or rubbing your eyes with unwashed hands is the simplest route for bacteria to reach your lash line. Sleeping in eye makeup is another major contributor, since cosmetics can physically block gland openings overnight. Expired makeup carries an even higher risk. A study analyzing mascara samples found S. aureus in 79% of them, and nearly all participants in the study admitted to using cosmetics past their expiration date. Mascara wands, which contact the lash line directly, are particularly effective at harboring and transferring bacteria.
Contact lens wearers face added risk if lenses aren’t cleaned properly or are handled with dirty fingers. Old or poorly maintained lenses can deposit bacteria and debris right against the eyelid with every blink.
Chronic Eyelid Conditions
Some people get styes repeatedly, and the reason is often an underlying condition that keeps their eyelid glands chronically inflamed or dysfunctional.
Blepharitis, a persistent low-grade inflammation of the eyelid margins, is the most common culprit. It causes flaking, crusting, and irritation along the lash line, which disrupts the normal flow of oil from the glands and creates an environment where bacteria thrive. People with blepharitis often notice styes coming back every few months.
Ocular rosacea, a form of the skin condition rosacea that affects the eyes, produces a similar cycle. The condition drives chronic inflammation of the eyelid and tear film, leading to ongoing oil gland dysfunction. Frequent styes are one of the earliest and most recognizable signs of ocular rosacea. The underlying problem is an overactive inflammatory response in the eyelid tissues, which damages gland function over time and makes repeated infections more likely.
Diabetes has also been linked to recurrent styes. High blood sugar impairs the immune system’s ability to fight off minor infections, and some clinicians consider recurring styes and eyelid inflammation a potential early sign of undiagnosed diabetes.
Stye vs. Chalazion
A chalazion looks similar to a stye at first, with redness, swelling, and mild pain. But within a day or two, the two conditions diverge. A stye stays painful, localizes right at the eyelid margin, and often develops a visible pus-filled head at the base of a lash. You may also notice tearing, light sensitivity, or a gritty feeling in the eye.
A chalazion, by contrast, shifts away from the lash line and settles into the body of the eyelid as a firm, painless lump. Chalazia are caused by a blocked oil gland that becomes inflamed but not actively infected, so they lack the sharp tenderness and pus of a true stye. The distinction matters because chalazia tend to linger for weeks or months and sometimes need different treatment, while most styes drain and heal within a week.
What Helps a Stye Heal
The standard first-line treatment is a warm compress. Soak a clean washcloth in warm water, wring it out, and hold it gently against the closed eye for about five minutes. Repeat this several times a day. The warmth softens the clogged material inside the gland, encourages the stye to drain naturally, and increases blood flow to help your body clear the infection. Most styes begin to improve within a few days of consistent warm compresses and resolve fully within one to two weeks.
Resist the urge to squeeze or pop a stye. Forcing it open can push bacteria deeper into the tissue or spread the infection to neighboring glands. If a stye doesn’t improve after a week of warm compresses, grows significantly larger, affects your vision, or keeps coming back, it may need to be drained professionally or treated with a short course of antibiotics.
Preventing Styes
Since most styes start with bacteria meeting a blocked gland, prevention comes down to keeping the eyelid area clean. Wash your hands before touching your face or handling contact lenses. Remove all eye makeup before bed, and replace mascara and eyeliner every three to four months, even if the tube isn’t empty. If you wear contacts, follow your recommended cleaning and replacement schedule strictly.
For people prone to recurrent styes, a daily eyelid hygiene routine can make a real difference. Gently cleaning the lash line with a warm, damp cloth each morning helps keep oil glands clear and reduces the bacterial load on the eyelid margin. If blepharitis or rosacea is driving the problem, treating the underlying condition is the most effective way to break the cycle.