What Causes Eye Styes? Triggers and Risk Factors

A stye is caused by a bacterial infection in one of the tiny oil or sweat glands along your eyelid margin. The culprit is almost always Staphylococcus aureus, a common bacterium that lives on your skin and can slip into a gland when the opening gets blocked. Once trapped inside, the bacteria multiply and trigger an inflammatory response, producing that familiar painful, red bump. Most styes resolve on their own within about a week, but understanding what causes them helps you prevent them from coming back.

How a Stye Forms

Your eyelids contain dozens of small glands that produce oils and fluids to keep your eyes lubricated. When one of these glands gets clogged by dead skin cells, dried oil, or debris, bacteria already present on your skin can colonize the blocked gland. The immune system responds with inflammation, and pus collects at the site, forming a tender bump that looks like a small pimple.

There are two types depending on which gland is involved. An external stye develops near the base of your eyelashes, where oil glands and sweat glands sit right at the lid margin. These are the most visible and tend to come to a head quickly. An internal stye forms deeper in the eyelid, in the larger oil glands embedded in the firm tissue of the lid itself. Internal styes are often more painful and take longer to drain because they’re further from the surface.

Common Risk Factors

Anything that introduces bacteria to your eyelid or blocks those glands raises your risk. The most common triggers are everyday habits you might not think twice about.

  • Touching your eyes with unwashed hands. This is the single most frequent way bacteria reach the eyelid glands. Rubbing your eyes after touching doorknobs, phones, or your face transfers staph bacteria directly to the lid margin.
  • Old or shared eye makeup. Makeup applicators pick up bacteria from your skin every time you use them, then transfer those bacteria back to the product. Mascara and liquid eyeliner should be replaced every four months. Solid eye pencils last up to a year. Sharing eye makeup with others multiplies the risk.
  • Sleeping in contact lenses. Contacts that stay in overnight trap bacteria against the eye surface and reduce oxygen flow, creating conditions that favor infection.
  • Not removing makeup before bed. Leftover makeup clogs gland openings overnight, giving bacteria hours to settle in.

Underlying Conditions That Increase Risk

Some people get styes repeatedly, and the cause often traces back to a chronic condition affecting the eyelids or immune system.

Blepharitis, a persistent low-grade inflammation of the eyelid margins, is one of the most common underlying causes of recurrent styes. It creates a cycle: inflamed lids produce thicker, stickier oil that clogs glands more easily, and clogged glands get infected more often. Ocular rosacea, a form of rosacea that targets the eyes and surrounding skin, works through a similar mechanism. It disrupts normal oil gland function in the eyelids and lists styes as one of its most common complications.

Diabetes also plays a role. People with diabetes are more susceptible to bacterial skin infections across the body, including styes. Elevated blood sugar impairs the immune system’s ability to fight off bacteria, which means infections that a healthy immune system would clear quickly can take hold more easily. If you’re getting styes frequently and don’t have an obvious explanation, it’s worth having your blood sugar checked.

Stye vs. Chalazion

Not every bump on your eyelid is a stye. A chalazion looks similar but develops differently. A stye is an active bacterial infection: red, painful, and often warm to the touch, typically with a visible white or yellow center. A chalazion is a blocked gland that has become inflamed but isn’t infected. It tends to be firmer, less painful, and slower to develop. Sometimes a stye that doesn’t fully drain turns into a chalazion over time. The distinction matters because chalazia that persist may need different treatment than a straightforward stye.

How Styes Heal

Most styes drain and resolve on their own within one to two weeks. The most effective thing you can do to speed the process is apply a warm compress. The American Academy of Ophthalmology recommends holding a clean, warm cloth against the affected eye for about five minutes at a time, two to four times per day. The heat softens the clogged oil, encourages the gland to open, and helps pus drain naturally. Resist the urge to squeeze or pop a stye, which can push the infection deeper into the tissue.

While the stye is healing, avoid wearing eye makeup and contact lenses. Reusing contaminated products can reintroduce bacteria and cause the stye to recur or worsen.

When a Stye Becomes Serious

Styes rarely cause complications, but in uncommon cases the infection can spread beyond the gland into the surrounding eyelid tissue. This condition, called preseptal cellulitis, causes the entire eyelid to become swollen, red, and warm. If swelling spreads to the area around the eye socket, you develop a fever, experience eye pain, notice vision changes, or see the eye starting to bulge forward, those are signs the infection may be moving deeper and needs urgent medical attention. Children are particularly susceptible to this progression.

A stye that hasn’t improved at all after two weeks of consistent warm compresses, or one that keeps coming back in the same spot, may need to be drained by a doctor or evaluated for an underlying condition like blepharitis or rosacea that’s keeping the cycle going.