Hand sanitizer is a liquid, gel, or foam generally used to decrease infectious agents on the hands. In most settings, hand washing with soap and water is generally preferred. Alcohol-based hand sanitizer works against a wide variety of microorganisms but not spores.