My Eyelid Is Swollen and Hurts: What’s Causing It?

A swollen, painful eyelid is most commonly caused by a stye, a small bacterial infection at the base of an eyelash or in one of the oil glands inside the lid. Less often, the culprit is a blocked oil gland (chalazion), an allergic reaction, or a more widespread infection of the skin around the eye. Most cases resolve at home within a week or two, but a few warning signs mean you should get medical attention quickly.

Styes: The Most Likely Cause

A stye (hordeolum) is a localized infection in one of the tiny glands along your eyelid. About 90 to 95 percent of styes are caused by Staphylococcus aureus, a common skin bacterium. They show up as a red, tender bump, often with a visible whitehead, and typically affect just one eye.

There are two types. An external stye forms right at the lash line, where it’s easy to see and usually comes to a head like a small pimple. An internal stye develops deeper inside the lid in one of the oil-producing glands (meibomian glands), so it looks more like generalized swelling without an obvious point. Internal styes tend to be more uncomfortable because of their deeper location, but both types are treated the same way.

Most styes drain on their own within 7 to 10 days. The single best thing you can do is apply a warm compress for about 5 minutes at a time, several times a day. Research shows it takes 2 to 3 minutes of sustained heat on the eyelid surface to soften the trapped oil inside the blocked gland, so brief touches with a warm cloth aren’t enough. Use a clean washcloth soaked in warm water, or a microwavable eye mask designed for this purpose, and hold it gently against the closed lid. Don’t squeeze or try to pop the stye. That can spread the infection deeper into the tissue.

Chalazion: When a Bump Lingers

A chalazion starts the same way, with a blocked oil gland, but instead of becoming infected it forms a firm, usually painless lump that can grow slowly over days or weeks. A chalazion is actually the most common cause of a focal eyelid swelling. It may be tender early on, but the pain typically fades as the bump hardens.

Chalazia often heal without treatment within about a month. Warm compresses speed the process. If the lump doesn’t shrink within two to four weeks, keeps growing, or starts pressing on your eyeball enough to blur your vision, a doctor can treat it with a steroid injection or a quick in-office drainage procedure. Recovery after surgical drainage takes roughly 10 days, with the eyelid looking normal again within about two weeks. A stye that never fully drains can turn into a chalazion, which is one reason consistent warm compresses matter early on.

Blepharitis: Chronic Lid Inflammation

If your eyelids are red, itchy, burning, and crusty along the lash line, especially if it happens in both eyes or keeps coming back, you likely have blepharitis. This is a chronic inflammatory condition rather than a single infection. You’ll often notice flaky debris clinging to the base of your lashes, similar to dandruff. In fact, blepharitis is frequently linked to seborrheic dermatitis (the same condition that causes scalp dandruff) and rosacea.

A deeper form called posterior blepharitis involves the oil glands inside the lids. These glands can become chronically blocked when their secretions thicken and clog the openings, a process called meibomian gland dysfunction. Over time, the glands can shrink and produce less oil, which destabilizes the tear film and leads to dry, irritated eyes on top of the lid inflammation. People with rosacea are especially prone to this cycle.

Blepharitis rarely goes away completely. Daily lid hygiene is the cornerstone of management: warm compresses to soften crusts, followed by gentle cleaning of the lid margins with diluted baby shampoo or a commercially available lid scrub. When hygiene alone isn’t enough, antibiotic eye drops or ointments can help reduce the bacterial load on the lids. For stubborn posterior blepharitis, oral antibiotics from the tetracycline family are sometimes used, though the evidence supporting them is limited to expert consensus rather than large clinical trials.

Allergic Reactions and Contact Dermatitis

Your eyelid skin is some of the thinnest on your body, which makes it especially vulnerable to allergens. If the swelling came on after using a new cosmetic product, skincare item, or eye drop, contact dermatitis is a strong possibility. The top allergen groups that trigger eyelid reactions are metals (especially nickel, found in eyelash curlers and some eyeshadows), shellac (common in mascara and nail polish transferred by touching the eyes), preservatives in eye drops and contact lens solutions, topical antibiotics like bacitracin, fragrances, acrylates in false eyelash adhesives, and surfactants in cleansers and shampoos.

Allergic eyelid swelling tends to involve redness, small bumps or blisters, and itching rather than the deep, focused pain of a stye. Both eyelids may be affected. The fix is identifying and avoiding the trigger. A cool compress and over-the-counter antihistamines can ease the discomfort while the reaction settles, which usually takes a few days once the allergen is removed. Chronic exposure leads to dry, scaly, thickened skin on the lids that can take longer to resolve.

Red Flags That Need Urgent Care

Most swollen eyelids are minor problems. A few patterns, however, signal a more serious infection that needs same-day medical evaluation.

Preseptal cellulitis is a bacterial skin infection of the tissue around the eye. The entire eyelid becomes red, swollen, warm, and painful, sometimes with fever. Vision and eye movement stay normal. It’s usually caused by a nearby skin wound or sinus infection and is treated with oral antibiotics. On its own, preseptal cellulitis is manageable, but it needs to be distinguished from orbital cellulitis, which is a deeper and more dangerous infection behind the eye.

Orbital cellulitis causes the eye itself to bulge forward, makes eye movements painful or restricted, and can reduce your vision or change your color perception. You may have a high fever. This is a medical emergency because the infection can compress the optic nerve and, in rare cases, spread to the brain. If your swollen eyelid is accompanied by a bulging eye, double vision, pain when you look around, or any change in how well you can see, go to an emergency department. Imaging with CT or MRI is used to confirm the diagnosis and guide treatment.

Keeping It From Coming Back

Styes and chalazia tend to recur in people who have underlying blepharitis or oily skin. A simple daily routine can reduce flare-ups significantly. After your morning shower, press a warm washcloth against your closed eyelids for a minute or two, then gently wipe along the lash line to clear any oil or debris. If you wear eye makeup, remove it completely every night. Replace mascara and liquid eyeliner every three months, since bacteria accumulate in the tubes. Avoid sharing eye cosmetics or touching your eyelids with unwashed hands.

If you have rosacea or seborrheic dermatitis, managing those conditions with appropriate treatment also reduces eyelid inflammation. People who wear contact lenses should be especially diligent about lens hygiene, since contaminated lenses and solutions are a common source of both irritation and infection.