How Do You Get a Stye: Causes, Duration, and Prevention

A stye forms when bacteria infect one of the tiny oil-producing glands along your eyelid margin. The process almost always starts the same way: a gland gets blocked, its oily secretions build up, and bacteria (most commonly Staphylococcus aureus, which already lives on your skin) move in and multiply. The result is that red, painful bump near your lash line that most people recognize instantly.

What Happens Inside Your Eyelid

Your eyelids contain dozens of small glands that produce the oily layer of your tear film. When one of these glands becomes clogged, its secretions stagnate. That warm, oil-rich environment is ideal for bacteria, and a localized infection develops quickly. The gland swells, fills with pus, and pushes outward to form the characteristic bump.

Most styes are external, meaning they develop at the base of an eyelash follicle in one of the smaller oil or sweat glands right at the lid margin. Less commonly, an internal stye forms deeper in the eyelid when one of the larger oil glands (called meibomian glands) gets infected. Internal styes tend to be more painful and point toward the inner surface of the eyelid rather than the outer skin.

Common Causes and Risk Factors

The single biggest factor is touching your eyes with unwashed hands. Every time you rub your eye or adjust a contact lens without clean fingers, you transfer bacteria directly to your eyelid glands. But hand hygiene is only part of the picture. Several other habits and conditions make styes more likely:

  • Old or shared eye makeup. Bacteria multiply in open cosmetic containers over time. Mascara and liquid eyeliner are only considered safe for about three months after opening. Makeup brushes should be washed every seven to ten days.
  • Sleeping in makeup. Leaving eye makeup on overnight clogs the gland openings along your lash line, trapping bacteria against warm, oily skin for hours.
  • Poor contact lens habits. Wearing lenses past their replacement schedule, reusing old solution, or handling lenses with dirty hands all increase the chance of introducing bacteria to your eyelids.
  • Chronic eyelid inflammation (blepharitis). This ongoing low-grade irritation thickens gland secretions and makes blockages more frequent. If you get styes repeatedly, blepharitis or meibomian gland dysfunction is a likely underlying cause.
  • Rosacea. People with skin rosacea, and especially ocular rosacea, are prone to blocked eyelid glands and recurrent styes.

Styes are also more common in adults than children. Higher hormone levels in adults increase the thickness of the oils these glands produce, making blockages more likely.

Styes Are Not Contagious

Despite how alarming they look, styes are not contagious. The American Academy of Ophthalmology describes them as a local infection of the oil-producing glands, not something that spreads from person to person. That said, sharing towels, pillowcases, or eye makeup is still a bad idea, since you’d be transferring bacteria that could cause a separate infection in someone whose glands are already prone to blockage.

Stye vs. Chalazion

In the first day or two, a stye and a chalazion look almost identical: both cause a red, swollen, tender bump on the eyelid. After that initial period, they diverge. A stye stays painful, forms a small yellowish pus-filled head near the lash line, and the surrounding skin remains red and swollen. A chalazion gradually becomes painless and settles into a firm, round nodule deeper in the eyelid body. The key difference is that a chalazion is a blockage without active infection, while a stye involves bacteria.

If your bump starts out painful but then becomes a painless lump that lingers for weeks, it has likely transitioned into a chalazion.

How Long a Stye Lasts

Most styes resolve on their own within one to two weeks. Warm compresses applied for 10 to 15 minutes several times a day are the standard home treatment. The heat loosens the blocked secretions and helps the stye drain naturally. Resist the urge to squeeze or pop it, which can spread the infection deeper into the eyelid.

If pain and swelling haven’t started improving after 48 hours of warm compresses, it’s worth seeing an eye doctor. You should also seek care if your eye swells shut, pus or blood leaks from the bump, blisters form on the eyelid, your eyelids feel hot to the touch, or your vision changes. Styes that keep coming back may signal an underlying condition like meibomian gland dysfunction that needs separate treatment.

How to Prevent Styes

Prevention comes down to keeping the bacteria on your skin away from the gland openings on your eyelids. Wash your hands before touching your face or handling contact lenses. Remove all eye makeup before bed every night. Replace mascara and liquid eyeliner every three months, and clean your brushes weekly. If you wear contacts, stick to the recommended replacement and cleaning schedule and always use fresh solution.

If you have blepharitis or rosacea, daily eyelid hygiene with a warm compress and gentle lid scrub can keep gland secretions flowing and reduce the frequency of blockages. Treating the underlying inflammation is the most effective way to break the cycle of recurrent styes.