sajad torkamani

In a nutshell

Base64 is a group of binary-to-text encoding schemes that lets you represent binary data in an ASCII string format by translating the binary into a radix-64 representation.

Because base64 encoding uses only ASCII characters, binary data can be base64 encoded and then used in a data: URL

Encode binary string into base64 using btoa()

btoa('Hello world')
// 'SGVsbG8gd29ybGQ='

Decode base64 into string using atob()

atob('SGVsbG8gd29ybGQ=')
// 'Hello world'

Other notes

Sources

Tagged: HTTP

Leave a comment

Your email address will not be published. Required fields are marked *