Converting JSON to Base64 using JavaScript without dependencies

I’m after reading a few posts on the subject, a few of which suggested atob/btoa are too buggy to be used in prod. mdn has no deprecation badge for them. I need a zero dependency JavaScript solution working with reasonably new browsers, I’m using it for JWK encoding. I tested atob/btoa with a few JWKs and it worked just fine, so did C# code decoding base64 strings encoded on a client. Can anyone in the know confirm if atob/btoa are safe to be used in prod or is there an alternative which’d work without node.js modules.