Xanax does not interact significantly with cocaine. If a person came to the ER with anxiety from cocaine, a Xanax-like medication would likely be given to the person.
But I can't really say it is 'safe' to take Xanax after cocaine. The Xanax is not likely to do anything bad, assuming you take it in a reasonable, therapeutic dose. But cocaine is NEVER a 'safe' medication. People will take cocaine for months or even years without incident, and then the next time they use it develop a fatal arrhythmia. The high profile death of Len Bias was an example of that situation, and the deaths of Belushi or Chris Farley were similar (they combined cocaine with opioids).
The Xanax will reduce the anxiety and agitation caused by cocaine, but will do nothing to reduce the risk of cardiac arrhythmia. I hope you get to treatment soon.
The Content on this Site is presented in a summary fashion, and is intended to be used for educational and entertainment purposes only. It is not intended to be and should not be interpreted as medical advice or a diagnosis of any health or fitness problem, condition or disease; or a recommendation for a specific test, doctor, care provider, procedure, treatment plan, product, or course of action. MedHelp is not a medical or healthcare provider and your use of this Site does not create a doctor / patient relationship. We disclaim all responsibility for the professional qualifications and licensing of, and services provided by, any physician or other health providers posting on or otherwise referred to on this Site and/or any Third Party Site. Never disregard the medical advice of your physician or health professional, or delay in seeking such advice, because of something you read on this Site. We offer this Site AS IS and without any warranties. By using this Site you agree to the following Terms and Conditions. If you think you may have a medical emergency, call your physician or 911 immediately.