A swollen eyelid that hurts when you blink is most often a stye, a small bacterial infection in one of the oil glands along your eyelid margin. Less commonly, the culprit is blepharitis (chronic eyelid inflammation) or a chalazion (a blocked gland without active infection). In rare cases, spreading infection around the eye socket causes the swelling, which requires urgent care. Here’s how to tell what you’re dealing with and what to do about it.
Styes: The Most Common Cause
A stye forms when bacteria, almost always Staphylococcus aureus, infect one of the tiny oil glands in your eyelid. That gland becomes blocked, fills with pus, and swells into a tender red bump. Staphylococcus aureus accounts for 90% to 95% of styes. The infection triggers your immune system to flood the area with white blood cells, creating a localized abscess. That’s why it hurts, especially when you blink and compress the inflamed tissue.
External styes appear right at the lash line, often centered on an infected hair follicle. Internal styes develop deeper in the lid, in the oil-producing glands on the inner surface. Internal styes tend to be more painful because the swelling presses against the eyeball with every blink. Both types typically look like a small, angry pimple on or near the eyelid edge.
Most styes resolve on their own within one to two weeks with basic home care. The key treatment is a warm compress: soak a clean washcloth in warm water, wring it out, and hold it gently against the closed eye for five minutes, several times a day. The warmth helps the blocked gland open and drain. Over-the-counter pain relievers can take the edge off while you wait. Resist the urge to squeeze or pop it, which can spread the infection deeper into the lid.
Chalazion: Swollen but Less Painful
If your eyelid has a firm bump that’s more annoying than truly painful, you may have a chalazion instead. A chalazion develops when an oil gland becomes blocked and the trapped secretions cause a slow, sterile inflammatory reaction rather than an active bacterial infection. The bump usually sits farther back from the lash line than a stye and can grow to the size of a pea.
Chalazia sometimes start as styes that never fully drain. Because there’s no active infection, they don’t produce the sharp, throbbing pain that styes do. You might feel pressure or mild soreness when blinking, especially if the bump is large enough to press on the eyeball. Warm compresses work here too, though chalazia can be stubborn. If one persists for more than a month, a doctor can drain it with a small in-office procedure.
Blepharitis: Chronic Lid Inflammation
Blepharitis is ongoing inflammation along the eyelid margins that causes swelling, itching, a gritty or burning sensation, and sometimes pain with blinking. Unlike a stye, which produces a single distinct bump, blepharitis affects the entire lid margin. You might wake up with crusty, dried debris stuck to your lashes and a feeling like sand is in your eyes.
Several things trigger or worsen blepharitis. Bacterial overgrowth along the lash line is common, as is rosacea, allergies to eye makeup or contact lens solutions, and an overpopulation of tiny Demodex mites that naturally live on eyelash follicles. These mites can inflame the hair follicles and clog oil glands, depleting the oily layer of your tear film and leaving your eyes dry and irritated on top of the swelling.
Managing blepharitis involves daily lid hygiene. Warm compresses loosen crusts and open clogged glands, and gentle cleansing with diluted baby shampoo or medicated eyelid wipes removes debris and bacteria. Some wipes contain terpinen-4-ol, a tea tree oil derivative with both antimicrobial and anti-inflammatory properties that’s particularly effective against Demodex mites. Blepharitis tends to be a recurring condition rather than a one-time event, so consistent lid hygiene matters more than a single burst of treatment.
Contact Dermatitis and Allergic Reactions
Sometimes the swelling isn’t from an infection at all. New eye makeup, a different contact lens solution, skincare products, or even airborne allergens like pollen can trigger contact dermatitis on the thin, sensitive eyelid skin. The swelling tends to be diffuse across the lid rather than concentrated in a single bump, and it’s usually accompanied by itching more than sharp pain. Removing the offending product and applying a cool compress typically brings relief within a day or two.
Signs That Need Urgent Attention
Most eyelid swelling is harmless and self-limiting, but certain symptoms signal that infection has spread beyond the surface of the lid. Preseptal cellulitis is an infection of the eyelid tissue itself, causing widespread redness and swelling. It’s treatable, but if infection pushes deeper into the eye socket, it becomes orbital cellulitis, a serious and potentially life-threatening condition.
The distinguishing features of orbital cellulitis are hard to miss. Your eye may begin to protrude forward. Moving your eye becomes painful, and you may notice restricted range of motion or double vision. Vision can decrease, and colors may look washed out, both signs that the optic nerve is being compressed. Fever, general fatigue, or a recent sinus infection in combination with worsening eyelid swelling raises the concern further. Orbital cellulitis can spread to the brain if untreated, so these symptoms call for emergency care, not a wait-and-see approach.
How to Tell What You’re Dealing With
A few simple observations can help you narrow down the cause:
- Single tender bump near the lash line that appeared in the last day or two: most likely a stye.
- Firm, painless or mildly sore lump farther back on the lid: likely a chalazion.
- Both lids red, crusty, and gritty-feeling, especially in the morning: likely blepharitis.
- Diffuse puffiness with itching after using a new product: likely contact dermatitis or an allergic reaction.
- Rapidly spreading redness with fever, bulging eye, or vision changes: possible cellulitis requiring immediate medical evaluation.
Practical Steps for Relief
For the vast majority of cases, warm compresses are the single most effective home treatment. Five minutes, several times a day, with a clean, warm washcloth. Rewet the cloth when it cools so you maintain consistent warmth throughout the session. This routine softens blocked oil, promotes drainage, and reduces inflammation regardless of whether you’re dealing with a stye, chalazion, or blepharitis flare.
Keep your hands away from the affected eye. Rubbing or pressing on the bump introduces more bacteria and can worsen swelling. If you wear contact lenses, switch to glasses until the swelling resolves. Skip eye makeup during this time as well, and throw away any mascara or eyeliner you were using when the swelling started, since the product may be contaminated.
If a stye hasn’t improved after two weeks of warm compresses, or if the swelling is getting worse rather than better after the first few days, a doctor can evaluate whether you need a topical or oral antibiotic, or whether the bump needs to be drained. Recurring styes or chalazia sometimes point to underlying blepharitis that needs its own treatment plan.

