Base64 encode/decode in Nodejs and Javascript

This article shows how you can base64 encode and decode string using both Nodejs and Javascript. Javascript: Base64 encode/decode string Encode String btoa() function creates a base-64 encoded ASCII string from the given String object. var encodedData = window.btoa("Hello World!"); console.log(encodedData); // output: SGVsbG8gV29ybGQh Decode String atob() function decoded the base-64 encoded string. var encodedData … Read more