A swollen, painful eyelid is most commonly caused by a stye, a small bacterial infection in one of the oil glands or hair follicles along your eyelid margin. But several other conditions can produce similar symptoms, ranging from a blocked oil gland to an allergic reaction to a more serious infection. The location of the swelling, how quickly it appeared, and whether it affects your vision all help narrow down what’s going on.
Styes: The Most Common Cause
A stye is a red, tender bump that forms at the base of an eyelash or just under the eyelid surface. It develops when bacteria infect one of the tiny oil-producing glands in your eyelid. External styes sit right along the lash line and look like a small pimple. Internal styes form deeper inside the lid and tend to cause more diffuse swelling, sometimes making the whole eyelid look puffy.
Styes are distinctly painful. When one first appears, your eyelid feels sore, red, and tender to the touch. Your eye may also feel scratchy or watery. Most styes last one to two weeks and resolve on their own without treatment. They occasionally drain a small amount of pus before healing.
Chalazion: Swollen but Less Painful
A chalazion looks similar to a stye but behaves differently. It forms when an oil gland in your eyelid clogs and the trapped oil causes a firm, round bump. Unlike a stye, a chalazion is not usually painful, at least not at first. You might not even notice it until it grows large enough to make your eyelid visibly swollen. As it enlarges, the lid can become red and mildly tender, but the sharp soreness of a stye is typically absent.
Chalazia tend to develop farther back on the eyelid than styes do. They also grow more slowly and can persist for weeks or months. If a bump on your eyelid has been there for a while and is more annoying than painful, a chalazion is the likely culprit.
Blepharitis: Ongoing Lid Irritation
If your eyelids are chronically red, crusty, and uncomfortable rather than producing a single obvious bump, you may be dealing with blepharitis. This is inflammation along the eyelid margins that tends to come and go over time. Symptoms are often worst in the morning and include burning, itching, flaking or crusting around the lashes, and a gritty feeling in the eyes.
There are two main forms. The first affects the front of the eyelid near your lashes, where bacteria or skin flaking (similar to dandruff) causes hard, matted scales to build up around the lash bases. This type can lead to lash loss over time. The second form involves the oil glands deeper in the lid. These glands become plugged, producing foamy or thick secretions along the lid margin instead of the thin, clear oil your tear film needs. People with this type are more prone to developing chalazia, sometimes multiple ones at a time.
Blepharitis doesn’t usually cause dramatic swelling the way a stye does, but it creates a low-grade puffiness and soreness that keeps coming back. It also makes you more susceptible to styes because the oil glands are already partially blocked.
Allergic Reactions and Contact Dermatitis
Your eyelid skin is thinner than almost anywhere else on your body, which makes it especially reactive to allergens and irritants. If both eyelids are swollen, itchy, and possibly scaly, an allergic or irritant reaction is a strong possibility.
Common triggers include cosmetics (mascara, eyeliner, eye shadow, sunscreen), skincare products like moisturizers and eye creams, soaps and cleansers, and topical antibiotics applied near the eyes. Even products you don’t apply directly to your eyelids can cause problems if residue transfers from your hands. Environmental factors like dust, chlorine, extreme cold, and extreme heat can also irritate the lids.
The pattern is the key clue here. If the swelling appeared after you started using a new product, or if it recurs every time you use a particular cosmetic, removing that product usually resolves things within a few days.
Preseptal Cellulitis: A More Serious Infection
Sometimes a swollen, painful eyelid signals an infection that has spread into the soft tissue of the lid itself. Preseptal cellulitis causes significant redness, warmth, and swelling across the eyelid. It can develop from a stye that worsens, an insect bite, a scratch, or a nearby sinus infection. Unlike a stye, the swelling is diffuse rather than localized to a single bump, and you may have a fever.
Preseptal cellulitis is treatable with antibiotics and does not affect your vision or your ability to move your eye. Those distinctions matter because a related condition, orbital cellulitis, involves infection behind the eyelid that reaches the eye socket. Orbital cellulitis can cause pain when you move your eye, double vision, decreased vision, and a noticeable bulging of the eyeball forward. It is a medical emergency that requires immediate treatment to prevent permanent vision loss.
Signs That Need Urgent Attention
Most eyelid swelling is not dangerous, but certain symptoms indicate something more serious is happening. Get evaluated promptly if you notice any of the following:
- Pain when moving your eye in any direction, which can signal infection spreading behind the eyelid
- Double vision or blurred vision that isn’t explained by the lid simply drooping over your eye
- Bulging of the eyeball that comes on suddenly, especially in one eye
- High fever alongside significant eyelid swelling
- Swelling that spreads rapidly to the cheek, forehead, or other eye within hours
The critical distinction is between the eyelid itself being swollen (common, usually manageable) and the eye behind it being affected (uncommon, potentially serious). If your vision is normal and your eye moves freely in all directions without pain, the infection is almost certainly limited to the lid.
What You Can Do at Home
For styes, chalazia, and mild blepharitis, warm compresses are the single most effective home treatment. Apply a warm, moist cloth to your closed eyelid for 5 to 10 minutes, 3 to 6 times a day. The heat loosens clogged oil, encourages drainage, and increases blood flow to help your body clear the infection or blockage. Use comfortably warm water, not hot. Don’t heat a wet cloth in the microwave, as it can develop hot spots that burn the delicate eyelid skin.
Keep your hands away from the area as much as possible. Rubbing or squeezing a stye can spread the infection and make things worse. If you wear contact lenses, switch to glasses until the swelling resolves. Remove eye makeup at night and consider taking a break from cosmetics on the affected eye until it heals.
For eyelids that are chronically crusty or flaky, gently cleaning the lid margin each morning with a warm washcloth can help keep the oil glands clear and reduce flare-ups over time. This is especially useful for blepharitis, which tends to be a recurring condition that improves with consistent daily lid hygiene rather than a one-time fix.
If warm compresses don’t improve things after a week or two, or if the swelling gets worse instead of better, the next step is an in-person evaluation. A chalazion that doesn’t shrink on its own can be drained with a simple office procedure. Persistent or worsening infections may need prescription treatment. And any swelling that affects your vision or causes pain with eye movement warrants same-day evaluation rather than watchful waiting.

