Free planar electrons in a uniform magnetic field are shown to possess the symmetry of area-preserving diffeomorphisms (W -infinity algebra). Intuitively, this is a consequence of gauge invariance, which forces dynamics to depend only on the flux. The infinity of generators of this symmetry act within each Landau level, which is infinite-dimensional in the thermodynamical limit. The incompressible ground states corresponding to completely filled Landau levels (integer quantum Hall effect) are shown to be infinitely symmetric, since they are annihilated by an infinite subset of generators. This geometrical characterization of incompressibility also holds for fractional fillings of the lowest level (simplest fractional Hall effect) in the presence of Haldane's effective two-body interactions. Although these modify the symmetry algebra, the corresponding incompressible ground states proposed by Laughlin are again symmetric with respect to the modified infinite algebra.