Easy Tutorial
❮ Jsref Parseint Prop Video Buffered ❯

atob() Method of Window

Window Object


Definition and Usage

The atob() method is used to decode a string that has been encoded using base-64 encoding.

The base-64 encoding method is btoa().

Syntax

window.atob(encodedStr)

Parameter Description:

Return Value


Browser Support

The numbers in the table indicate the first browser version that supports the method.

Method
atob() Yes 10.0 1.0 Yes Yes

Example

Display an alert box:

var str = "tutorialpro";
var enc = window.btoa(str);
var dec = window.atob(enc);

var res = "Encoded string: " + enc + "<br>" + "Decoded string: " + dec;

Window Object

❮ Jsref Parseint Prop Video Buffered ❯