Acetazolamide belongs to a class of drugs known as carbonic anhydrase inhibitors. It works by decreasing the production of fluid inside the eye. It is also used to decrease a buildup of body fluids (edema) caused by heart failure or certain medications.