Native support to encode/decode base64 in javaScript
You can create a base64 encoded ASCII string from a "string" of binary data.
var encodedData = window.btoa( "Franklin Javier" ); // encode a string
var decodedData = window.atob( encodedData ); // decode the string
Basic support: Chrome, Firefox, IE10, Opera, Safari
Written by Franklin Javier
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Base64
Authors
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#