These two are treated as equivalent grades of pure water and they are not. Both produce water with very little dissolved in it, and they get there by mechanisms that differ in one decisive respect: whether the process acts on things that carry no electrical charge. That single difference determines which one a given job needs.
Distillation removes by phase change
Water is boiled to steam and condensed back, so anything that does not evaporate with it stays behind in the boiling vessel. That includes minerals and salts, heavy metals and nitrate, and also bacteria, viruses and most organic matter. It is an indiscriminate separation, which is its strength. The one gap is compounds volatile enough to boil near water, which can carry over into the condensate unless the still is vented or followed by a carbon stage.
Deionization removes by charge
Water passes through cation and anion exchange resins that swap dissolved ions for hydrogen and hydroxide, which combine into more water. Dissolved salts go essentially completely, which gives very low conductivity. Everything uncharged remains: dissolved organic compounds, particulates, bacteria and viruses. So deionized water can read almost zero on a conductivity meter and still be microbiologically unsuitable, which is why it is not sold as a drinking water product.
Which one each job needs
Drinking, and anything where organisms matter: distilled. Laboratory work where ionic contamination would interfere with results: deionized. Spot free rinsing of cars and glass: deionized, since the requirement is simply the absence of ions and it is far faster to produce in volume. Steam irons, humidifiers and batteries: either. Anything where the concern is unknown contamination rather than a known ionic one: distilled, because it does not depend on the contaminant carrying a charge.
Cost and speed
Deionization is fast and needs no heat, but resin is consumed in proportion to what was dissolved in the feed, so on hard water the cost per volume climbs steeply and softening the feed first is standard practice. The USGS classes water above 180 mg/L as calcium carbonate as very hard, which exhausts a cartridge quickly. Distillation is slow and spends electricity boiling every liter but consumes nothing else. Our softener guide covers protecting a deionizer's feed.
Questions people ask about distilled water vs deionized water
Which is purer, distilled or deionized?
It depends on the contaminant. Deionized has lower conductivity; distilled also removes organics and micro organisms.
Can I drink deionized water?
It is not sold or handled as a drinking water product, because ion exchange leaves bacteria, viruses and organics untouched.
Which is better for spot free rinsing?
Deionized. The requirement is only the absence of dissolved ions, and it is far faster to produce in volume.
Why does deionizing cost so much on hard water?
Resin capacity is consumed in proportion to what was dissolved in the feed, so hard water exhausts a cartridge quickly.