A stye forms when bacteria — most often Staphylococcus aureus — get into a tiny gland or hair follicle along the edge of your eyelid and cause a localized infection. The gland becomes blocked, bacteria multiply inside it, and your immune system responds with redness, swelling, and pain. That combination produces the small, tender bump most people recognize as a stye.
How Do You Get A Stye In The Eye Causes Explained
Your eyelids are lined with dozens of small glands. Some produce oil to coat your tears. Others sit at the base of your eyelashes. A stye starts when one of these openings gets blocked and bacteria that normally live on your skin get trapped inside.
The infection is usually caused by Staphylococcus aureus. This bacterium is common on healthy skin. It only becomes a problem when it gets into a blocked gland or follicle.
There are two main types of styes, and where they form tells you which gland is involved:
- External hordeolum — forms on the outer edge of the eyelid at the base of an eyelash. This is the most common type.
- Internal hordeolum — forms deeper inside the eyelid in a meibomian gland, which produces the oily part of your tear film. These tend to be more painful and slower to resolve.
Both types are infections. Both are usually caused by the same family of bacteria. The difference is depth and which gland is affected.
What Causes The Gland To Block In The First Place?
Blockage is the setup. Infection is what follows.
Glands in the eyelid can become blocked when oil thickens or when dead skin cells and debris plug the opening. Once the opening is sealed, bacteria already sitting on the skin surface can multiply inside the trapped oil.
Several things make this more likely:
- Touching or rubbing your eyes with unwashed hands
- Using old or contaminated eye makeup, especially mascara and eyeliner
- Sleeping in eye makeup, which lets bacteria and debris collect at the lash line
- Contact lens habits that irritate the eyelid margin
- Skin conditions that affect the eyelids, like blepharitis or rosacea
Blepharitis deserves a closer look. It is inflammation of the eyelid margin that often involves the same oil glands. People with blepharitis tend to get styes more often because their gland openings are already inflamed and prone to blocking.
This is the part many people miss: a stye is not usually caused by a single act of poor hygiene. It is more often the result of a gland that was already primed to block, plus bacteria that were already present.
Is A Stye Contagious?
A stye itself is not considered contagious. You cannot catch a stye from someone else by being near them or touching the same surface.
Here is the nuance. The bacteria involved, Staphylococcus aureus, can spread from person to person through direct contact. But the bacteria alone do not cause a stye. They need a blocked gland to create one. So while the bacteria can move between people, the stye does not.
You can, however, spread the infection from one of your own eyes to the other. If you touch an infected eyelid and then rub your other eye, you may introduce bacteria to a gland that was already vulnerable. Washing your hands after touching the area is a reasonable precaution.
What Makes Some People More Prone To Styes?
Some people get a stye once and never again. Others get them repeatedly. The difference usually comes down to eyelid health and gland function.
Factors that raise the likelihood of recurring styes include:
- Chronic blepharitis — ongoing inflammation of the eyelid margin
- Ocular rosacea — a skin condition that can affect the eyelids and oil glands
- Seborrheic dermatitis — flaky, oily skin that can involve the lash line
- Diabetes — higher blood sugar can impair immune response and wound healing
- Dry eye — poor tear quality can affect gland function
- Hormonal changes — which can alter oil gland activity
If you get styes often, the pattern itself is worth discussing with an eye doctor. Recurring styes can point to an underlying eyelid condition that needs its own management.
What Is The Difference Between A Stye And A Chalazion?
These two look similar but are not the same thing. The distinction matters because the approach to each is different.
| Feature | Stye (Hordeolum) | Chalazion |
|---|---|---|
| Cause | Bacterial infection of a gland or follicle | Blocked oil gland without active infection |
| Pain | Usually tender or painful | Typically painless or mildly uncomfortable |
| Appearance | Red, swollen, may have a visible pus point | Firm, round lump, less redness |
| Location | Eyelid edge or just inside the lid | Deeper within the eyelid |
| Typical course | Often resolves within a few days to a week | May take weeks to months to resolve |
A chalazion starts as a blocked gland, not an infected one. If bacteria get into a chalazion, it can turn into a stye. The two conditions can overlap, which is why some people are told they have one when they actually have the other.
This distinction is not just academic. A stye may respond to warm compresses and hygiene. A chalazion that persists may need medical evaluation or treatment.
Can Stress Or Diet Cause A Stye?
There is no strong evidence that stress or a specific food directly causes a stye. The claim circulates online, but it does not hold up well under scrutiny.
What stress and poor sleep can do is affect immune function generally. If your immune system is run down, you may be slower to fight off a minor infection like a stye. But that is different from saying stress causes the stye.
Diet plays a similar indirect role. Some research suggests that diets high in omega-3 fatty acids may support oil gland function in the eyelid, but the evidence is not strong enough to say that any particular diet prevents styes. No clinical guidelines currently recommend a specific diet for stye prevention.
The more direct factors — blocked glands, bacteria, eyelid inflammation — are where the real cause lies.
What Does Not Cause A Stye
Several common beliefs about styes are not supported by evidence. Clearing these up matters because they can lead to the wrong response.
- Looking at someone with a stye. This is a folk belief with no scientific basis. Styes are not transmitted by sight.
- Poor vision or eye strain. Neither causes a stye. They may cause other eye symptoms, but not this one.
- Eating too much of a specific food. No single food has been shown to cause a stye.
- Not wearing glasses. There is no established link between glasses use and stye formation.
What does raise your risk is anything that blocks a gland or introduces bacteria to the eyelid margin. That includes rubbing your eyes, using expired makeup, and not cleaning your eyelids if you have blepharitis.
When Should A Stye Be Checked By A Doctor?
Most styes are minor and resolve on their own within a few days to a week. A few situations warrant medical attention.
See a doctor if:
- The stye does not improve after several days of warm compresses
- Swelling spreads to the whole eyelid or surrounding area
- You have increasing pain or vision changes
- The stye keeps coming back in the same spot
- You have a condition that affects immune function, such as diabetes
An internal hordeolum can sometimes progress to a more serious infection of the eyelid tissue. This is uncommon, but it is why a stye that worsens rather than improves should be evaluated.
Do not squeeze or try to pop a stye. This can push bacteria deeper into the eyelid and make the infection worse. Warm compresses and gentle eyelid hygiene are the standard first steps. Some clinicians recommend antibiotic ointments for certain cases, but this is not universally needed and should be guided by a doctor.
Frequently Asked Questions
How do you get a stye in your eye?
A stye develops when bacteria, usually Staphylococcus aureus, infect a blocked gland or hair follicle on your eyelid. The blockage traps bacteria inside, and the resulting infection causes the red, tender bump.
Are styes caused by poor hygiene?
Poor hygiene is not the sole cause, but habits like touching your eyes with dirty hands or sleeping in old eye makeup can raise your risk. Many styes occur in people with no obvious hygiene issues.
Can stress cause a stye?
No evidence shows that stress directly causes a stye. Stress may affect your immune system broadly, which could slow your body’s response to a minor infection, but it is not a direct cause.
Why do I keep getting styes?
Recurring styes often point to an underlying eyelid condition such as blepharitis or ocular rosacea, which keeps gland openings inflamed and prone to blocking. If styes keep returning, an eye doctor can evaluate the underlying cause.

