Convert a string to base64 in JavaScript. btoa and atob are deprecated

The Node btoa() and atob() functions are the only ones that have been deprecated. However, if you’re working on the DOM code (front-end) and see this deprecated notice, you can use the window object to get around it.

window.atob()

For more info

Leave a Comment