I strongly advise against giving your dog Xanax or any human medication.
Why It's Dangerous
Human medications are formulated for people, not dogs. Xanax (alprazolam) can cause sedation, weakness, respiratory depression, liver damage, or even death in dogs. Even small amounts can be harmful.
What to Do Instead
Consult a veterinarian. They can identify the cause of anxiety, prescribe dog-safe medication, and recommend behavioral therapy. Always seek professional advice before giving your dog any medication.