A stye forms when one of the tiny oil-producing glands in your eyelid gets blocked and bacteria move in. The culprit is almost always Staphylococcus, a type of bacteria that normally lives harmlessly on your skin. When it gets trapped inside a clogged gland, it triggers an infection that swells into a painful, red bump on the edge of your eyelid.
What Happens Inside Your Eyelid
Your eyelids contain dozens of small glands that produce oils to keep your eyes lubricated. Some of these glands sit at the base of your eyelashes, while others are embedded deeper in the eyelid itself. When dead skin cells, dried oil, or debris plug one of these glands, bacteria that were already living on your skin surface get sealed inside. Cut off from the open air and surrounded by oily material, the bacteria multiply, and your immune system responds with inflammation. The result is a tender, swollen bump that develops over a few days.
There are two types. An external stye forms at the base of an eyelash, right at the eyelid’s edge, and is usually the more painful of the two. An internal stye develops deeper inside the eyelid, in the larger oil glands embedded in the eyelid tissue. Internal styes can be harder to see but often cause a noticeable aching sensation when you blink.
Common Causes and Risk Factors
The most direct cause is transferring bacteria to your eyelid. Touching or rubbing your eyes with unwashed hands is the single most common way this happens. But several everyday habits raise your risk significantly:
- Sleeping in eye makeup. Leaving mascara, eyeliner, or eyeshadow on overnight clogs the glands along your lash line. Old or expired cosmetics are even worse. Mascara and liquid eyeliner should be replaced every four months, while solid eye pencils can last up to a year.
- Poor contact lens hygiene. Inserting lenses without washing your hands first, or skipping proper disinfection, introduces bacteria directly to the eye area.
- Using expired cosmetics. Bacteria grow readily in old makeup products, especially liquid formulas that stay warm in a bathroom drawer.
Certain chronic conditions also make styes more likely to recur. Blepharitis, a condition where the eyelid margins stay chronically inflamed, disrupts the normal flow of oil from the glands and creates an environment where blockages happen more easily. Ocular rosacea, a form of rosacea that affects the eyes, causes ongoing inflammation of the eyelid margin and tear film. Styes and similar bumps are frequent indicators of this condition. Seborrheic dermatitis and a history of skin allergies also increase the risk, particularly in children.
Are Styes Contagious?
A stye generally isn’t contagious, but it’s possible to spread small amounts of bacteria from one. This is why it’s important to wash your hands before and after touching your face while you have a stye. Washing your pillowcases frequently during a flare-up also helps prevent the bacteria from spreading to your other eye or to someone else in your household. Avoid touching the stye unless you’re cleaning it or applying a warm compress.
How a Stye Differs From a Chalazion
People often confuse styes with chalazia (the plural of chalazion), but the two feel quite different. A stye is very painful and tends to appear right at the eyelid’s edge, usually around an infected eyelash root. A chalazion is typically not painful and develops farther back on the eyelid. Chalazia form when a blocked gland becomes chronically inflamed without an active bacterial infection. Sometimes a stye that doesn’t fully resolve turns into a chalazion over time, leaving a firm, painless lump.
How Long a Stye Lasts
Most styes are self-limiting. They develop over a few days, peak in swelling and tenderness, and then resolve on their own within about a week. With consistent warm compresses (a clean, warm washcloth held against the closed eyelid for 10 to 15 minutes, several times a day), most styes clear up within one to two weeks. The warmth helps soften the clogged material and encourages the gland to drain naturally.
While the stye is healing, avoid squeezing or popping it. Forcing it open can push bacteria deeper into the tissue and lead to a worse infection.
Signs That Need Medical Attention
Most styes don’t require a doctor visit, but some warning signs suggest the infection may be spreading. If the redness and swelling extend beyond the eyelid bump and spread across your eyelid or toward your cheek, that could indicate a more serious infection called cellulitis. A high fever combined with significant eye swelling, a bulging eye, or changes in vision warrants an emergency room visit, especially in children. If a stye hasn’t improved at all after two weeks of warm compresses, or if you keep getting styes in the same spot, an eye care provider can evaluate whether an underlying condition like blepharitis or meibomian gland dysfunction is contributing to the problem.
Reducing Your Risk
Since styes start with clogged glands and everyday bacteria, prevention comes down to keeping your eyelids clean and minimizing contamination. Wash your hands before touching your eyes or handling contact lenses. Remove all eye makeup before bed every night, and replace mascara and liquid liner at least every four months. If you wear contact lenses, follow the disinfection schedule your eye care provider recommends and never sleep in lenses not designed for overnight wear.
If you’re prone to recurrent styes, a nightly eyelid hygiene routine can make a real difference. Gently washing your closed eyelids with diluted baby shampoo or a commercially available lid scrub removes the debris and excess oil that lead to gland blockages. A brief warm compress before bed also helps keep the oil glands flowing freely.

