A stye forms when bacteria, almost always staphylococcus, infect one of the small glands along your eyelid. These glands produce oil that keeps your tear film stable, and when one gets clogged or contaminated, bacteria multiply inside it, creating a painful, red bump. Most people will get at least one stye in their lifetime, and understanding what triggers them can help you avoid repeat episodes.
What Actually Happens Inside Your Eyelid
Your eyelids contain dozens of tiny glands. Some sit right at the base of your eyelashes and produce oil that coats the lash follicle. Others, called meibomian glands, are embedded deeper in the eyelid and release oil onto the surface of your eye every time you blink. A stye starts when staph bacteria, which normally live on your skin in small numbers, get into one of these glands and cause an infection.
When the infected gland is near the lash line, the bump appears on the outer edge of your eyelid, close to your eyelashes. When a deeper meibomian gland is involved, the bump tends to show up on the inner surface of the eyelid, where it may be less visible but still quite painful. Either way, the result is the same: a swollen, tender lump filled with pus that typically comes to a head within a few days.
Common Causes and Risk Factors
The bacteria responsible for styes already live on your skin. They become a problem when they’re introduced into a gland in higher numbers than your body can handle, or when a gland is already partially blocked and creates a warm, stagnant environment for bacteria to thrive. Several everyday habits make this more likely.
Touching or rubbing your eyes is the most straightforward route. Your hands carry staph bacteria throughout the day, and rubbing your eyes transfers them directly to the gland openings along your lash line.
Old or shared makeup is a significant source of contamination. The FDA notes that eye cosmetics have a shorter safe shelf life than other products because of repeated microbial exposure during use. Industry experts recommend replacing mascara three months after purchase. If mascara dries out, toss it rather than adding water or saliva, both of which introduce bacteria directly into the product. Sharing eye makeup with others further increases contamination risk. “All natural” cosmetics with limited or no preservatives can be especially prone to bacterial growth.
Contact lens habits also play a role. Research published in BMJ Open Ophthalmology found that showering while wearing contact lenses tripled the risk of eye infections, and daily showering in lenses increased the risk more than sevenfold. Sleeping in lenses carried a similar threefold increase in risk. Water from showers, pools, and taps contains microorganisms that cling to lens surfaces and can colonize the area around your eyelids.
Underlying skin conditions are a less obvious trigger. People with blepharitis (chronic eyelid inflammation), seborrheic dermatitis, rosacea, or atopic dermatitis develop styes more frequently. These conditions alter the skin’s oil production and bacterial balance along the eyelid margin, making gland blockages and infections more likely. Recurrent styes are often tied to staph strains that persistently colonize inflamed eyelids.
What a Stye Feels Like
The first sign is usually tenderness or a gritty sensation on one part of your eyelid, sometimes before any visible bump appears. Within a day or two, the area becomes red and swollen, and a small, firm lump develops. It hurts when you touch it or blink. Your eye may water more than usual, and the eyelid can feel heavy or puffy. Some people notice sensitivity to light. A yellowish point of pus sometimes becomes visible at the center of the bump as it matures.
Stye vs. Chalazion
A chalazion looks similar to a stye but behaves differently. The key distinction is pain: a stye hurts, especially when you press on it. A chalazion, even a large one, typically does not. That’s because a chalazion isn’t a bacterial infection. It forms when an oil gland becomes blocked and the trapped oil causes a slow, chronic inflammatory reaction, not an acute infection with pus.
Chalazia tend to develop deeper in the eyelid, often on the inner surface, and they grow more gradually. A stye usually comes on quickly and sits near the lash line. If your eyelid bump has been there for weeks without much pain, it’s more likely a chalazion. Both can occur on either the upper or lower eyelid.
How Long a Stye Lasts
Most styes resolve on their own within one to two weeks. Many drain spontaneously within the first week. Applying a clean, warm compress for 10 to 15 minutes several times a day is the standard home treatment. The heat softens the clogged oil, encourages the gland to open, and speeds drainage. After the stye drains, the pain and swelling drop off quickly.
One thing you should never do is squeeze or pop a stye. The American Academy of Ophthalmology warns that popping a stye can release bacteria and spread the infection to other parts of the eye. Let it drain naturally or with the help of warm compresses.
Signs of a More Serious Problem
Rarely, the infection from a stye can spread beyond the gland into the surrounding tissue of the eyelid. This is called periorbital cellulitis, and it looks different from a simple stye: the entire eyelid or the skin around the eye becomes deeply red, hot, and swollen, often with fever. If the infection spreads further into the eye socket, it can cause the eye to bulge forward, pain with eye movement, reduced vision, or difficulty moving the eye normally. These are urgent symptoms that need immediate medical attention.
A stye that hasn’t improved at all after two weeks, one that keeps coming back in the same spot, or one accompanied by significant eyelid swelling and fever warrants professional evaluation. In persistent cases, a doctor can drain the stye through a small incision or prescribe targeted treatment to clear the infection.
Preventing Styes
Most prevention comes down to keeping bacteria away from your eyelid glands. Wash your hands before touching your face or handling contact lenses. Replace eye makeup regularly, and never share mascara, eyeliner, or eyeshadow brushes. Remove all eye makeup before bed so it doesn’t sit in your gland openings overnight.
If you wear contact lenses, remove them before showering, swimming, or sleeping (unless they’re specifically designed for overnight wear). Clean your lens case with fresh solution, not water, and replace the case itself every three months.
For people with blepharitis or other chronic eyelid inflammation, a daily lid-cleaning routine can reduce the frequency of styes. Gently wiping the base of your lashes with a warm, damp cloth or a diluted baby shampoo solution removes the excess oil and bacterial buildup that set the stage for gland infections.

