English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Window atob() Method

JavaScript Window Object

atob()Method decodes base-64encoded.

This method decodes the string that has beenbtoa()A string of data encoded by the method.

Syntax:

window.atob(encodedStr)
var str = "Hello World";
var enc = window.btoa(str);
var dec = window.atob(enc);
var ans = "String Encoding: " + enc + "<br>" + "String Decoding: " + dec;
Test and See‹/›

Browser Compatibility

The numbers in the table specify the first browser version that fully supports the atob() method:

Method
atob()Is1IsIs10

Parameter Value

ParameterDescription
encodedStrA string encoded by the btoa() method

Technical Details

Return Value:A string representing the decoded string

Related References

Window (Window) Reference:btoa() Method

JavaScript Window Object