English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
btoa()Method encoding base-64The string.
This method uses the string "AZ", "az", "0-9”,“ +”,“ /Encode the string using the " and " = " characters.
Usageatob()Method for base-64Decode the encoded string.
window.btoa(str)
var str = "Hello World"; var enc = window.btoa(str); var ans = "String Encoding: " + enc;Test See‹/›
The number in the table specifies the first browser version that fully supports the btoa() method:
Method | |||||
btoa() | Is | 1 | Is | Is | 10 |
Parameter | Description |
---|---|
str | To encode the string |
Return Value: | A string representing base-64Encoded String |
---|
Window (Window) Reference:atob() Method