Window atob() method

Definition and usage

atob() The method decodes base-64 encoded strings.

Tip:atob() The decoding method has been btoa() method Encoded string.

See also:

btoa() method

Example

Decode base-64 encoded strings:

let text = "Hello World!";
let encoded = window.btoa(text);
let decoded = window.atob(encoded);

try it yourself

syntax

window.atob(encoded)

parameter

parameter Description
encoded Required. The string to be decoded.

Return Value

Type Description
String Decoded String.

Browser Support

All Browsers Support atob():

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Support 10-11 Support Support Support Support