A stye forms when bacteria infect one of the small oil or sweat glands in your eyelid. The culprit is almost always Staphylococcus aureus, a common bacterium that naturally lives on your skin and around your eyes. When it gets trapped inside a blocked gland, the resulting infection creates that familiar red, painful bump at the edge of your eyelid.
What Happens Inside the Eyelid
Your eyelids contain several types of tiny glands that keep your eyes lubricated. Oil glands at the base of each eyelash produce a thin layer of lipid that prevents your tears from evaporating too quickly. Deeper inside the eyelid, a row of larger oil glands (called meibomian glands) produce the main lipid layer of your tear film.
The infection process starts with a blockage. Bacteria living on the eyelid surface produce enzymes called lipases that break down oils into free fatty acids, cholesterol, and other byproducts. These substances accumulate inside the gland’s duct, clogging it. Once the duct is blocked, bacteria multiply in the trapped secretions, and your immune system sends white blood cells to fight the infection. That inflammatory response is what causes the swelling, redness, and tenderness you feel.
The whole process typically plays out over one to two days before the stye becomes a distinct, localized bump.
External vs. Internal Styes
Not all styes form in the same place, and the location tells you which gland is involved.
An external stye develops right at the eyelid margin, at the base of an eyelash. It involves either the small oil glands attached to lash follicles or the modified sweat glands nearby. These are the styes most people picture: a visible, pimple-like bump on the outer edge of the lid that’s tender to the touch.
An internal stye forms deeper within the eyelid, in the larger meibomian glands embedded in the firm tissue (tarsal plate) behind the lashes. Internal styes tend to cause more diffuse swelling and can be harder to see from the outside. The pain and redness often show up on the inner surface of the lid rather than along the lash line. Because internal styes sit deeper, they can take longer to come to a head and drain.
Common Triggers and Risk Factors
The bacteria that cause styes are already on most people’s skin. What matters is whether those bacteria get the opportunity to infect a gland. Several everyday habits and health conditions tip the odds.
Eye makeup. Every time you apply mascara or eyeliner, the applicator picks up bacteria from your skin and transfers it back into the product. Over time, makeup containers become breeding grounds. Liquid products like mascara and liquid eyeliner should be replaced every four months; solid eye pencils can last up to a year. Sleeping in eye makeup is especially risky because the product sits on your lash line for hours, fueling bacterial growth right next to the glands most vulnerable to infection.
Touching your eyes. Rubbing your eyes with unwashed hands introduces bacteria directly to the eyelid margin. This is one of the most common and most preventable triggers.
Contact lenses. Handling lenses without clean hands, or wearing them longer than recommended, increases the bacterial load around your eyes and raises the risk of gland blockage.
Existing eyelid inflammation. If you already have chronic eyelid inflammation (blepharitis), your glands are more prone to blockage. Blepharitis creates a cycle where bacterial enzymes break down oils, the byproducts irritate the lid margin, and the resulting inflammation narrows the gland openings, making styes more likely.
Uncontrolled diabetes. High blood sugar triggers the production of molecules that suppress the immune system’s ability to fight off infections. People with poorly managed diabetes are more prone to styes because their bodies are less effective at keeping normal skin bacteria in check.
Stress and sleep deprivation. Chronic stress and fatigue weaken immune function broadly, which can make you more susceptible to minor infections like styes.
Stye vs. Chalazion
A chalazion can look a lot like a stye in the first couple of days, and the two are sometimes clinically indistinguishable early on. The key difference is what drives them. A stye is an active bacterial infection. A chalazion is a blocked gland that becomes inflamed but without an acute infection.
After the first day or two, the distinction becomes clearer. A stye stays painful and localizes to the eyelid margin. A chalazion migrates toward the center of the eyelid body and forms a small, firm, painless nodule. Chalazia tend to linger for weeks or months if untreated, while styes usually resolve faster.
How Long Styes Last
Most styes follow a predictable course of one to two weeks. The bump appears, fills with pus, and eventually drains on its own. Warm compresses are the standard home treatment: applying a clean, warm cloth to the closed eyelid for five to ten minutes, several times a day, helps soften the blocked material and encourages the stye to drain naturally.
You should avoid squeezing or popping a stye. Forcing it open can push the infection deeper into the eyelid tissue or spread bacteria to surrounding glands. Most styes resolve without antibiotics or any other medical intervention beyond warm compresses and keeping the area clean.
When a Stye Becomes Something More Serious
Rarely, the infection from a stye can spread beyond the gland and into the surrounding tissue of the eyelid or eye socket. Periorbital cellulitis, an infection of the tissue around the eye, causes widespread redness and swelling that extends well beyond the original bump. If the infection pushes deeper behind the eye, it can become orbital cellulitis, a more dangerous condition with distinct warning signs: the eye may begin to bulge forward, movement of the eye becomes painful or restricted, and vision can deteriorate.
Swelling that spreads rapidly across the entire eyelid, fever, changes in vision, pain when moving the eye, or a stye that shows no improvement after two weeks all warrant prompt medical attention. These complications are uncommon, but they escalate quickly when they do occur.
Preventing Recurrent Styes
If you get styes repeatedly, the issue is usually ongoing bacterial colonization of the eyelid margin or chronic gland dysfunction. A few consistent habits make a significant difference. Washing your hands before touching your face, removing all eye makeup before bed, and replacing cosmetic products on schedule reduce the bacterial load around your lashes. Daily eyelid hygiene, using a warm compress followed by gentle cleaning of the lash line with diluted baby shampoo or a commercial lid scrub, keeps gland openings clear.
For people with blepharitis or meibomian gland dysfunction, regular warm compresses even when no stye is present help keep the oil flowing and prevent the blockages that start the whole cycle. If styes keep coming back despite good hygiene, it’s worth checking whether an underlying condition like diabetes or rosacea is contributing to the problem.

