What Causes a Stye on Your Eye and How to Treat It

A stye forms when one of the tiny oil glands along your eyelid gets clogged and then infected, almost always by bacteria that naturally live on your skin. The result is a red, painful bump that looks and feels like a small pimple at the edge of your eyelid. Most styes clear up on their own within two to five days, though some linger for a week or longer.

How a Stye Develops

Your eyelids contain dozens of small glands that produce oils to keep your tears from evaporating too quickly. When one of these glands gets blocked, the oily secretion thickens and backs up inside the gland. Bacteria, most commonly Staphylococcus aureus (staph), take advantage of that stagnant environment and multiply, triggering the swelling, redness, and tenderness you recognize as a stye.

The process typically starts with underlying inflammation of the eyelid margin. The gland openings become clogged with thickened secretions, and within a day or two the infection localizes into a distinct, tender bump. You might also notice your eye watering more than usual or a gritty feeling when you blink.

External vs. Internal Styes

Most styes are external. They form at the base of an eyelash, involving the small oil and sweat glands right at the lash line. These are the ones you can usually see as a whitish or yellowish bump on the outer edge of your eyelid.

Internal styes are less common and develop deeper inside the eyelid, in the larger oil-producing glands embedded in the eyelid’s inner tissue. They cause the same pain and swelling but are harder to see because the bump faces inward toward the eyeball rather than outward. Internal styes tend to be more uncomfortable and can take longer to resolve.

Risk Factors That Make Styes More Likely

Some people get styes once and never again. Others deal with them repeatedly. Several everyday habits and conditions increase your chances.

Blepharitis. This is chronic, low-grade inflammation along the eyelid margins. It’s the single most common underlying factor. If you frequently have crusty, flaky, or irritated eyelids, especially in the morning, blepharitis is likely contributing to recurrent styes by keeping those gland openings inflamed and prone to blockage.

Old or contaminated makeup. Bacteria thrive on mascara wands, liquid eyeliner tips, and makeup brushes. Mascara and liquid eyeliner should be replaced every four months. Solid eye pencils can last up to a year. Leaving eye makeup on overnight is particularly risky because it gives bacteria hours to multiply along your lash line while your eyes are closed.

Touching your eyes. Your hands carry bacteria from everything you touch throughout the day. Rubbing your eyes transfers those bacteria directly to the gland openings on your eyelids.

Contact lens habits. Improper contact lens care, including not disinfecting lenses regularly, wearing them past their recommended replacement date, or handling them with unwashed hands, introduces bacteria to the eye area and raises stye risk.

Previous styes. If you’ve had one stye, you’re statistically more likely to get another. This often signals an ongoing issue with eyelid inflammation or gland function rather than bad luck.

Stye vs. Chalazion

A chalazion looks similar to a stye but has a different cause. While a stye is an active infection with pain, redness, and tenderness, a chalazion is a blocked gland without infection. It forms a firm, usually painless lump that grows slowly over weeks. Sometimes a stye that doesn’t fully drain turns into a chalazion after the infection clears but the blockage remains. If you have a bump on your eyelid that isn’t painful and has been there for more than a couple of weeks, it’s more likely a chalazion than a stye.

What Helps a Stye Heal

Most styes don’t need medical treatment. They mature, drain on their own, and resolve within a few days to a couple of weeks. The single most effective thing you can do at home is apply a warm compress. Research shows it takes about two to three minutes of sustained heat on the eyelid surface to liquefy the hardened oil trapped inside the blocked gland. The American Academy of Ophthalmology recommends applying warm compresses for about five minutes at a time, two to four times per day.

Use a clean washcloth soaked in warm (not hot) water, or a microwavable eye mask designed for this purpose. The heat softens the blockage and encourages the gland to open and drain naturally. Resist the urge to squeeze or pop a stye. Forcing it can push the infection deeper into the eyelid tissue and make things significantly worse.

While the stye is active, take a break from eye makeup and contact lenses. If you were using mascara or eyeliner when the stye developed, throw those products away, as they may be contaminated with the bacteria that caused the infection.

Signs of a More Serious Problem

Styes are rarely dangerous, but in uncommon cases the infection can spread beyond the eyelid into the surrounding tissue. Warning signs include swelling that extends well beyond the eyelid to the skin around your eye, a fever, a bulging eye, pain or difficulty moving the eye, or changes in your vision. These symptoms can indicate a deeper infection called cellulitis, which needs prompt medical attention. In children especially, a high fever combined with significant swelling around the eye warrants an emergency room visit.

A stye that hasn’t improved at all after a week of consistent warm compresses, or one that keeps coming back in the same spot, is also worth having evaluated. Persistent or recurrent styes sometimes need a minor in-office procedure to drain, or they may point to an underlying eyelid condition that benefits from targeted treatment.