Window atob()
Example
Decode a base-64 encoded string:
let text = "Hello World!";
let encoded = window.btoa(text);
let decoded = window.atob(encoded);
Try it Yourself »
Description
The atob()
method decodes a base-64 encoded string.
Note
The atob()
method decodes a string that has been encoded by the
btoa()
method.
See Also:
Syntax
window.atob(encoded)
Parameters
Parameter | Description |
encoded | Required. The string to be decoded. |
Return Value
Type | Description |
A string | The decoded string. |
Browser Support
atob()
is supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 10-11 | Yes | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.