Encode and Decode Strings with Base64 in JavaScript

Google Scripts offer the Utilities.base64Encode() and base64Decode() methods to easily encode and decode strings in base64 respectively. You can do Base64 encoding and decoding in plain Javascript as well. Here’s the un-minified code to help you understand what happens behind the scene.

Related

Amit Agarwal is a web geek, ex-columnist for The Wall Street Journal and founder of Digital Inspiration, a hugely popular tech how-to website since 2004. He holds an engineering degree in Computer Science from IIT and happens to be the first professional blogger in India. He's been profiled on Lifehacker. With 19 years' experience in software development, Amit has authored several popular Google Add-ons that are deployed in some of the biggest companies and universities worldwide with over 250,000 installations. Download the PDF brochure to know more.