Xanax is a brand name for the medication alprazolam, which belongs to the benzodiazepine class of drugs. Like Ativan, Xanax is primarily prescribed to treat anxiety disorders, panic disorders, and occasionally for other conditions such as insomnia or certain types of seizures.