Yes, a stye is a bacterial infection. It occurs when one of the small glands along your eyelid becomes blocked, and that stagnant buildup gets infected, almost always by Staphylococcus aureus, a common skin bacterium. The result is a red, painful bump on or near the edge of your eyelid that looks and feels a lot like a pimple.
What Happens Inside the Eyelid
Your eyelids contain dozens of tiny glands that produce oils and sweat to keep your eyes lubricated. When one of these glands gets clogged, its secretions back up and create a breeding ground for bacteria already living on your skin. The infection triggers your immune system, which sends white blood cells to the area. That immune response is what causes the swelling, redness, tenderness, and the visible pus-filled bump.
There are two types. An external stye forms at the base of an eyelash, in the smaller oil or sweat glands near the lid margin. An internal stye develops deeper in the eyelid, in a larger oil-producing gland. Internal styes tend to be more painful because the swelling pushes against the eye itself, but both types involve the same basic process: blockage followed by bacterial infection.
Styes vs. Chalazions
Not every eyelid bump is an infection. A chalazion looks similar to a stye but is not caused by bacteria. It forms when a deeper oil gland gets blocked and the trapped material irritates the surrounding tissue, creating a small, firm, usually painless nodule. The body responds with a type of chronic inflammation rather than an acute infection.
The easiest way to tell them apart is pain. A stye hurts. It stays tender, often feels warm, and localizes right along the eyelid margin. A chalazion typically develops as a nontender lump that grows slowly over days or weeks. That said, a stye that doesn’t fully resolve can sometimes turn into a chalazion once the acute infection fades but the blocked gland remains clogged.
Who Gets Styes More Often
Anyone can develop a stye, but certain conditions raise your risk. People with blepharitis, a chronic inflammation of the eyelid margins, are especially prone because their glands are already partially blocked. Ocular rosacea, a subtype of the skin condition rosacea that affects the eyes, also increases stye frequency. The itching and burning from rosacea can lead to reflexive eye rubbing, which introduces more bacteria to already vulnerable glands.
Other common risk factors include leaving eye makeup on overnight, using expired cosmetics, touching your eyes with unwashed hands, and wearing contact lenses without proper hygiene. Stress and lack of sleep don’t directly cause styes, but they can weaken your immune response enough that a minor gland blockage progresses to a full infection.
How Styes Heal
Most styes resolve on their own within one to two weeks. The bump gradually comes to a head, drains, and the swelling goes down. You can speed this along with warm compresses: soak a clean cloth in warm water and hold it gently against your closed eyelid for 10 to 15 minutes, several times a day. The heat loosens the blocked material and encourages drainage. Cleaning the eyelid with a gentle soap or diluted baby shampoo also helps keep the area clear of excess bacteria.
Over-the-counter pain relievers can take the edge off the tenderness. What you should avoid is squeezing or popping the stye. Forcing it open can push infected material deeper into the eyelid tissue or spread bacteria to neighboring glands.
When Antibiotics Are Needed
If a stye isn’t improving after a week or two of warm compresses, antibiotic eye drops or ointment may be necessary. Your doctor can also prescribe oral antibiotics if the infection has spread beyond the original bump into the surrounding eyelid or eye tissue. This kind of spread is uncommon but worth watching for.
The main warning sign is swelling that extends well beyond the bump itself. If the entire eyelid becomes puffy, warm, red, and tender, or if you develop a fever, the infection may have progressed to preseptal cellulitis, a more serious infection of the tissue around the eye. Vision and eye movement typically remain normal with preseptal cellulitis, but the eyelid can swell so much it’s difficult to open. This requires prompt medical treatment with antibiotics to prevent the infection from spreading deeper into the eye socket.
Preventing Recurrent Styes
If you get styes repeatedly, the issue is almost always related to eyelid hygiene. A daily routine of gently washing your eyelid margins with warm water and mild soap can keep glands from clogging in the first place. Replace eye makeup every few months, and never share mascara, eyeliner, or eye brushes. Remove all makeup before bed.
If you wear contact lenses, wash your hands thoroughly before handling them and follow your replacement schedule. For people with underlying conditions like blepharitis or ocular rosacea, managing those conditions with regular lid hygiene and any prescribed treatments significantly reduces how often styes develop.

