Find your content:

Search form

You are here

What is atob() and btoa()?

 
Share

These functions are to used encode and decode the base64. These functions are available in window object.

btoa() - It creates a base64 encoded string

atob() - decodes a base64

const encodedData = window.btoa('Hello, world'); // encode a string
const decodedData = window.atob(encodedData); // decode the string

My Block Status

My Block Content