What Causes Styes on Your Eyelid and How They Form

Styes are caused by a bacterial infection in the oil glands or hair follicles of your eyelid. The culprit is almost always Staphylococcus aureus, a common bacterium that lives on your skin and only causes trouble when it gets trapped inside a blocked gland. The process starts with a clog: oil thickens and stops flowing, bacteria multiply in the stagnant buildup, and a small abscess forms. Most styes last one to two weeks and resolve on their own.

How a Stye Actually Forms

Your eyelids contain dozens of tiny oil-producing glands. These glands serve two purposes: some coat your eyelashes to keep them flexible, while others produce an oily layer that sits on your tear film and prevents your eyes from drying out. When one of these glands gets clogged, its secretions thicken and stagnate. That stagnant oil becomes a breeding ground for staph bacteria, which are already present on your skin in small numbers.

The infection triggers your immune system to send white blood cells to the area. Those cells, along with dead bacteria and tissue debris, form a pocket of pus. That’s the tender, swollen bump you see and feel on your eyelid.

External vs. Internal Styes

Not all styes form in the same spot, and the location determines how the bump looks and feels.

An external stye (the most common type) develops at the base of an eyelash. It involves the small oil glands that open directly into the hair follicle and keep your lashes moisturized. These styes appear right along the lash line, usually as a visible red bump that looks like a pimple.

An internal stye forms deeper in the eyelid, inside one of the larger oil glands embedded in the firm tissue of the lid itself. These glands produce the oily component of your tears. When one becomes infected, the bump points inward toward the eye rather than outward, and you might notice a yellowish spot on the inner surface of your eyelid. Internal styes tend to be more painful because of their location.

Risk Factors That Make Styes More Likely

Some people get a stye once and never again. Others deal with them repeatedly. The difference usually comes down to ongoing conditions or habits that keep the eyelid glands partially blocked or expose them to more bacteria.

Blepharitis and Rosacea

Blepharitis, a chronic inflammation of the eyelid margins, is the single biggest risk factor for recurrent styes. It causes a low-grade buildup of oil, dead skin, and bacteria along the lash line that keeps the glands perpetually on the verge of clogging. Rosacea, particularly the form that affects the eyes (ocular rosacea), creates a similar problem by blocking the eyelid’s oil glands. If you get styes frequently, one of these underlying conditions is often the reason.

Eye Makeup Habits

Old or contaminated cosmetics are a common and preventable trigger. Every time you apply mascara or eyeliner, you introduce bacteria from your skin into the product. The FDA notes that some industry experts recommend replacing mascara just three months after purchase because of repeated microbial exposure. Sharing makeup increases contamination risk even further, and store “tester” products are especially problematic. If mascara dries out, toss it. Adding water or saliva to revive it introduces bacteria directly into the tube.

Contact Lens Use

Wearing contact lenses increases your risk if your hygiene isn’t meticulous. Sleeping in contacts, reusing or topping off old solution instead of replacing it, and wearing lenses past their recommended lifespan all allow bacteria to build up around the eyes. Even lenses marketed as “no rub” should be rubbed during cleaning to loosen protein and bacterial deposits. Lens cases should be replaced at least three times a year.

Touching Your Eyes

Your hands carry staph bacteria constantly. Rubbing your eyes, adjusting contacts without washing your hands, or picking at the skin around your lash line can push those bacteria into gland openings. This is especially relevant for people who rub their eyes out of habit or due to allergies.

How a Stye Differs From a Chalazion

Styes and chalazia look similar but behave differently. A stye is an active bacterial infection: it’s red, tender, and often comes with a visible whitehead. It develops quickly, usually over a day or two, and the area feels warm and sore.

A chalazion starts the same way, with a blocked oil gland, but there’s no bacterial infection involved. Instead, the trapped oil causes a slow, inflammatory reaction. Chalazia tend to be firmer, less painful, and slower to develop. They sit deeper in the lid and can linger for weeks or months. A stye that doesn’t fully drain can sometimes turn into a chalazion once the infection clears but the blockage remains.

When a Stye Becomes Something More Serious

Most styes are harmless and heal within one to two weeks. Rarely, the infection can spread beyond the gland into the surrounding eyelid tissue, causing a condition called preseptal cellulitis. Signs include redness and swelling that extend well beyond the original bump, covering much of the eyelid. Your eye movements and vision remain normal with preseptal cellulitis, which distinguishes it from a deeper and more dangerous infection called orbital cellulitis.

Orbital cellulitis affects the tissue behind the eyelid and can cause pain with eye movement, double vision, a bulging eye, or decreased vision. In children, it often comes with fever and a visibly ill appearance. Any changes to your vision, difficulty moving your eye, or swelling that makes it impossible to open the lid warrants urgent medical attention.

Preventing Styes Before They Start

If you’re prone to styes, the goal is to keep your eyelid glands flowing freely and reduce the bacterial load along your lash line.

Warm compresses are the most effective preventive habit. A clean washcloth soaked in warm water, held against your closed eyelid for three to five minutes, softens thickened oil and helps it drain naturally. Following up with a gentle 30-second massage along the length of your upper and lower lids pushes that softened oil out of the glands.

For people with blepharitis or frequent styes, a daily eyelid scrub adds another layer of protection. Mix baby shampoo with warm water in equal parts, apply it to a clean washcloth, and gently rub along the base of your lashes for about a minute per eye. Rinse with cool water. Doing this two to three times daily during flare-ups, or once daily for maintenance, helps keep the lash line clear of the debris that leads to blockages.

Beyond eyelid hygiene, the basics matter: wash your hands before touching your face, replace mascara every three months, never share eye cosmetics, clean your contact lenses properly every time, and avoid sleeping in contacts. These habits won’t guarantee you’ll never get another stye, but they address the most common ways bacteria find their way into a vulnerable gland.