Valium and Xanax are brand names for two types of medication for anxiety. The generic name for Valium is diazepam. The generic name for Xanax is alprazolam. Many anxiety symptoms result, to some extent, from a chemical imbalance in the brain. Medication can help change this imbalance. Sedatives slow down certain functions in the body.