The short answer
Soak a cloudy glass in white vinegar for 15 minutes: if the haze dissolves, it's hard-water film and every glass can be rescued the same way. If the glass stays cloudy, it's etching — microscopic damage to the glass itself — and no cleaner will reverse it, so the goal shifts to preventing it on the rest of your glassware.
That one test decides everything else in this guide. Film is a mineral deposit sitting on top of the glass; etching is the glass surface being slowly eaten away by hot water and alkaline detergent. They look nearly identical on the shelf, which is why so much cloudy-glass advice fails: vinegar tricks can't fix etching, and rinse aid alone won't strip years of built-up film.
The vinegar test: film or etching?
Fill the glass with undiluted white vinegar (or submerge it in a bowl of vinegar) and wait about 15 minutes, then rinse and dry. Vinegar's acidity dissolves the calcium and magnesium deposits that hard water leaves behind, so a film-clouded glass comes out noticeably clearer. An etched glass looks exactly the same afterward.
A second check: rub the cloudy area with your fingernail or a drop of vinegar on a cloth. Film feels slightly chalky and can smear or squeak off; etching feels like the glass itself and often shows as faint rainbow-tinged iridescence, pinpoint pits, or fine scratch-like lines. Etching also tends to appear on your most-washed everyday glasses first, while film hits everything in the load equally — including items like Brita water pitchers in hard-water homes.
How to fix hard-water film
Vinegar soak: submerge glasses in warm white vinegar for 15–30 minutes, then gently scrub with a soft sponge or bottle brush, rinse, and dry with a lint-free towel. Stubborn, years-old film may need an overnight soak or a second round. Never use anything abrasive — scouring powder or steel wool trades film for permanent scratches.
Citric acid works even faster on heavy buildup: dissolve a tablespoon of citric acid powder in a sink of hot water and soak, or run the empty dishwasher on hot with citric acid (or a citric-based dishwasher cleaner) in the detergent cup. That machine clean matters — a scale-coated dishwasher re-deposits minerals on every load. Then refill the rinse aid dispenser: rinse aid makes water sheet off instead of drying into spots, and it's the single cheapest fix for recurring film.
How to prevent cloudy glasses in the dishwasher
Know your water. Hard water causes film; very soft water accelerates etching. If you have a softener, keep it topped up with salt but don't over-soften; if your water is naturally soft, use less detergent — soft water plus a full dose of alkaline detergent is exactly the chemistry that etches glass.
Use less detergent than you think, and stop pre-rinsing. This is the counterintuitive part: dishwasher detergent needs food soil to work on. In a pre-rinsed load, the aggressive enzymes and alkaline salts have nothing to attack except your glassware's surface. Scrape plates, skip the rinse, and dose detergent to your water hardness — often half the recommended amount in soft-water areas.
Run gentler cycles for glassware. Lower-temperature or 'glass/light' cycles slow both mineral deposits and etching, and skipping heated dry helps too. Load glasses on the top rack with space between them, angled so water drains off the rim, and take them out before the hottest drying phase if your machine tends to bake spots on.
Which glasses to hand-wash
Some glass should never see a dishwasher: crystal (especially lead crystal, which etches fastest), thin or hand-blown glassware, glasses with gold or metallic rims, hand-painted designs, and anything vintage or sentimental. These are the pieces where etching shows first and hurts most, and five minutes at the sink with warm water and mild soap keeps them clear for decades.
Everyday soda-lime glasses and sturdy tempered glassware handle the dishwasher fine with the prevention habits above. If a favorite everyday set is starting to show the first signs of iridescence, that's your cue to move it to hand washing before the damage becomes obvious.
When cloudiness is permanent
If the vinegar test fails, the surface of the glass has been chemically worn away and no product can restore it — etching is subtraction, not buildup. Lightly etched glasses are still perfectly safe to drink from; they're just cosmetically dull, and many people happily keep using them.
Treat etched glasses as a diagnostic, not just a loss: they're telling you your detergent dose, water softness, and cycle heat are aggressive enough to eat glass. Cut the detergent, add rinse aid, drop the temperature, and hand-wash whatever you'd be sad to lose. Replacements washed under the new routine will stay clear.