What Causes a Stye in the Eye and How to Treat It

A stye is a small, painful bump on the eyelid caused by a bacterial infection in one of the tiny oil or sweat glands near your eyelashes. Most styes heal on their own within one to two weeks, but warm compresses can speed things along and reduce discomfort significantly.

What Causes a Stye

Your eyelids contain dozens of small glands that produce oils and sweat to keep your eyes lubricated. When bacteria, most commonly Staphylococcus aureus (the same type behind many skin infections), get into one of these glands, the gland becomes infected and swells into a tender, red bump. The bacteria are often already living on your skin or inside your nose. They reach the eyelid through touching your eyes with unwashed hands, rubbing your lids, or transferring bacteria from contaminated items like old makeup or dirty contact lenses.

The infection blocks the gland’s opening, trapping oil and pus inside. Your immune system responds with inflammation, which is why styes are painful, red, and sometimes warm to the touch. A small white or yellowish head often appears as pus collects near the surface.

External vs. Internal Styes

Not all styes form in the same spot, and the location affects how they feel.

An external stye develops right at the edge of your eyelid, at the base of an eyelash. It involves the small oil glands or sweat glands clustered around each lash follicle. These are the most common type and the easiest to see: a visible, pimple-like bump along your lash line.

An internal stye forms deeper inside the eyelid, in the larger oil-producing glands embedded in the firm tissue of the lid itself. These glands normally produce the oily layer of your tear film. Internal styes tend to be more painful because they press against the eye, and they may not be visible from the outside. You might only notice a swollen, tender area on the inner surface of the lid when you gently flip it.

Risk Factors That Make Styes More Likely

Some people get styes once and never again. Others deal with them repeatedly, and that usually points to an underlying condition. Blepharitis, a chronic inflammation of the eyelid margins, is one of the biggest culprits. It creates a persistently irritated environment along the lash line where bacteria thrive and glands clog more easily. Anterior blepharitis is commonly driven by staph bacteria or tiny Demodex mites that live in eyelash follicles, while posterior blepharitis involves blockage of the deeper oil glands.

Rosacea, the skin condition that causes facial redness and flushing, also raises your risk substantially. A large multi-institution study found that people with rosacea were more than three times as likely to have blepharitis compared to those without the condition. Rosacea increases the density of Demodex mites on the skin and eyelids, and these mites can physically block oil glands, triggering inflammation and setting the stage for infection.

Other common risk factors include wearing eye makeup overnight, using expired cosmetics, handling contact lenses without washing your hands, and chronic dry eye conditions that disrupt the normal protective tear film.

How to Treat a Stye at Home

Warm compresses are the single most effective home treatment. The heat softens the hardened oils plugging the gland, encourages drainage, and increases blood flow to help your body fight the infection. Use a clean washcloth soaked in warm (not hot) water, wring it out, and hold it gently against the closed eyelid for 5 to 10 minutes. Repeat this 3 to 6 times a day. Avoid microwaving a wet cloth, as it can heat unevenly and burn the delicate eyelid skin.

Between compresses, keep the area clean. You can gently wash the eyelid with diluted baby shampoo or a commercial eyelid cleanser on a cotton pad. This removes crusting and bacteria from the lash line without irritating the eye.

A few things to avoid: don’t squeeze or pop a stye the way you might a pimple. Squeezing can push the infection deeper into the eyelid or spread bacteria to surrounding tissue. Skip eye makeup until the stye has fully healed, and don’t wear contact lenses during the active infection since they can harbor bacteria and irritate the area further.

When Medical Treatment Is Needed

Most styes resolve with warm compresses alone, but some need a nudge from medication. If a stye hasn’t improved after a week of consistent home care, or if swelling is getting worse rather than better, a doctor may prescribe a topical antibiotic ointment. Erythromycin ointment is a common first choice because it targets the gram-positive bacteria typically responsible. For people allergic to erythromycin, alternatives are available by prescription. Over-the-counter options like Neosporin can also be used on the external eyelid surface.

For styes that are particularly large, deep, or persistent, a doctor may perform a small in-office drainage procedure. This involves numbing the area with a local anesthetic and making a tiny incision to release the trapped pus. It sounds uncomfortable, but it typically provides immediate relief and heals quickly.

Stye vs. Chalazion

People often confuse styes with chalazia (the plural of chalazion), and sometimes a stye actually turns into one. The key difference is pain. A stye is very painful, appears at or near the eyelid’s edge, and is caused by active infection. A chalazion is usually not painful. It tends to develop farther back on the eyelid, away from the lash line, and results from a blocked oil gland without active bacterial infection.

A chalazion often starts as a stye. Once the infection clears, the blocked gland can remain swollen with trapped oil, forming a firm, painless lump that may persist for weeks or months. Warm compresses help chalazia too, but large ones sometimes require a steroid injection or minor surgical drainage.

Warning Signs of a Serious Complication

Styes are almost always harmless, but in rare cases the infection can spread beyond the gland into the surrounding eyelid tissue, a condition called periorbital cellulitis. Watch for redness and swelling that spreads across the entire eyelid or onto the cheek, fever, or the eyelid becoming so swollen it’s difficult to open.

Even more rarely, infection can spread behind the eye into the orbital space. Signs of this more serious situation include the eye itself pushing forward (bulging), pain when moving the eye, double vision, or decreased vision. These symptoms need urgent medical attention, as orbital infections can threaten eyesight if untreated.

Preventing Styes From Coming Back

If you’ve had one stye, you’re more likely to get another, especially if the underlying conditions haven’t changed. A daily eyelid hygiene routine makes a real difference. Wash your eyelids gently each morning as part of your face-washing routine, using a mild cleanser or pre-moistened eyelid wipes designed for the purpose.

Replace eye makeup regularly. Mascara and eyeliner collect bacteria over time, so tossing them every three months is a reasonable practice. Never share eye makeup or applicators. If you wear contacts, wash your hands thoroughly before handling them and follow the recommended replacement schedule for your lens type. For people with blepharitis or rosacea, managing those conditions with your doctor’s guidance reduces the frequency of styes significantly by keeping the eyelid glands healthier and less prone to blockage.