When you're using textarea and copy and paste this text \x1b[32mHELLO WORLD\x1b[m you will see this:

But when it's inside HTML it displays as:

At least in Firefox
in Chrome it displays as:

Is there a way to make \x1b display in all browsers? Maybe there is some CSS I don't know that will make it visible or some other trick.
I need this for RapidAPI example. I want to add API that do something with ANSI escapes, but I'm to able to add example. RapidAPI encode the payload with JSON.stringify (they said that they work on fixing the encoding). Adding a description of how to send the data (which RapidAPI suggested) make \x1b no visible (at least in Firefox) and you don't know what users will copy to see the effect of the API.
I don't control the HTML and CSS of RapidAPI but I can suggest this to their tech support.
This is the raw text:
[32mHELLO WORLD[m