Xanax for Anxiety- Xanax is used to treat anxiety disorder and panic disorders. It belongs to a class of medications called benzodiazepines. If you constantly battle with anxiety and panic attacks, your healthcare provider might prescribe you Xanax. It is an effective drug for managing anxiety and panic attacks.