Compiling in the browser has a fairly limited use case, so if you are working on a production site you should be precompiling your scripts server-side. See setup build systems for more information.
You can use babel/babel-standalone as a precompiled version of babel or run a bundler on babel yourself.
You can also use the many online tools to prototype a script:
Online Editors that run Babel for you: