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. It looks similar to a pimple, feels tender to the touch, and usually resolves on its own within one to two weeks. While styes are common and rarely serious, understanding what triggers them can help you avoid repeat episodes.
How a Stye Forms
Your eyelids contain dozens of small glands that produce oils and sweat to keep your eyes lubricated. When bacteria get into one of these glands, the gland becomes blocked and infected, filling with pus and swelling into a painful bump. The bacterium responsible is almost always Staphylococcus aureus, a common skin bacterium that naturally lives on your face and around your eyes.
The infection process involves bacterial enzymes that break down fats inside the gland, releasing fatty acids and other byproducts that clog the gland’s duct. Your immune system responds by sending white blood cells to the area, creating the redness, swelling, and tenderness you feel. Within two to four days, the bump typically comes to a head and ruptures on its own, draining pus and relieving the pain.
External vs. Internal Styes
External styes are the most common type. They form in the oil or sweat glands right at the base of your eyelashes, so they appear as a visible bump along the eyelid’s edge. These tend to be smaller, come to a head relatively quickly, and drain on their own.
Internal styes develop deeper in the eyelid, in the oil glands embedded within the firm tissue (called the tarsal plate) that gives your eyelid its shape. These glands produce the oily layer of your tear film. Because the infection sits deeper, internal styes can be more painful and may take longer to resolve. You might not see an obvious bump on the outside of your eyelid, but you’ll feel a tender, swollen area, and redness may be more visible on the inner surface of the lid.
What Causes a Stye
The immediate cause is always bacterial infection of a blocked gland. But several factors make that infection more likely to happen in the first place.
Touching your eyes with unwashed hands is one of the most direct routes. Your hands carry large amounts of bacteria that transfer easily to your eyelids and eyelashes. This is especially relevant if you rub your eyes frequently throughout the day.
Contact lens habits play a significant role. Failing to disinfect lenses daily or sleeping in contacts creates a warm, moist environment close to your eyelids where bacteria thrive.
Old eye makeup collects dirt and bacteria over time. Replacing eye makeup every six months helps prevent bacterial overgrowth. Sleeping in makeup is particularly risky because it sits against your glands for hours.
Previous styes are one of the strongest predictors. If you’ve had one before, you’re more prone to getting them again, likely because the underlying conditions that led to the first one (gland anatomy, skin bacteria levels, or habits) haven’t changed.
Skin Conditions That Raise Your Risk
Several chronic conditions make styes significantly more likely by changing the environment around your eyelids:
- Blepharitis is chronic inflammation of the eyelids that causes redness, tearing, light sensitivity, and a gritty feeling in the eyes. It makes the eyelid glands more prone to infection.
- Rosacea can affect the eyes (called ocular rosacea), leading to blocked oil glands around the eyelids. People with acne-related rosacea on their face are at higher risk.
- Seborrheic dermatitis causes eyelid swelling and excess oily secretions, creating conditions where bacteria can more easily colonize the glands.
- Uncontrolled diabetes raises stye risk because high blood sugar produces molecules that suppress immune defenses, making infections of all kinds more likely.
Stye vs. Chalazion
A chalazion looks similar to a stye but is a different condition. The key difference: a stye is an active infection, while a chalazion is a painless blockage of an oil gland without infection. A chalazion forms when an oil gland gets clogged and the trapped material irritates the surrounding tissue, causing a small, firm, nontender nodule in the center of the eyelid. A stye, by contrast, stays painful and localizes to the eyelid margin near the lashes.
Sometimes a stye that doesn’t fully drain turns into a chalazion. If you have a bump on your eyelid that isn’t painful and has been there for several weeks, it’s more likely a chalazion than a stye.
How Styes Heal
Most styes resolve on their own within one to two weeks without any medical treatment. The most effective home treatment is a warm, moist compress applied to the affected eye for 5 to 10 minutes, 3 to 6 times per day. The warmth helps soften the blocked material inside the gland and encourages drainage. Use a clean cloth soaked in warm (not hot) water. Don’t heat a wet cloth in the microwave, as it can become hot enough to burn the thin skin of your eyelid.
Resist the urge to squeeze or pop a stye. Forcing it open can spread the infection to surrounding glands or deeper into the eyelid tissue. Let it drain naturally. While it heals, avoid wearing contact lenses and eye makeup on the affected eye.
Signs of a More Serious Problem
In rare cases, a stye infection can spread beyond the gland into the surrounding eyelid tissue, causing a condition called preseptal cellulitis. This looks like spreading redness and swelling across the entire eyelid rather than a localized bump. If the infection spreads even deeper into the eye socket, it becomes orbital cellulitis, which is a medical emergency. Watch for fever, pain around the entire eye socket, vision changes, or the eye beginning to bulge forward. Children are more susceptible to this progression than adults.

