← Stop Hacking Base64 With btoa(). toBase64() Fixes It Natively.
Playground

btoa() vs toBase64() — interactive playground

preview

Edits run in a sandbox in your browser — nothing is saved and nothing leaves the page.