Both medications are benzodiazepines, CNS depressants, and ways of treating anxiety or panic attacks. Both are short acting drugs, but clonazepam stays in the body for longer than Xanax. The half-life of Xanax is 6–25 hours , while for clonazepam, it is 22–54 hours.