See it in Action - https://www.apps4developers.com/base64
Converting Plain Text to Base64 Encoded String
btoa() generates a Base64 encoded ASCII string from plain text. This method is useful to encode text that is not in a URL-safe format.
Passing a string to btoa method will return a Base64 encoded string.
Example
btoa("Apps4Developers.com")
---
Converting Base64 Encoded String to Plain Text
atob() method is used to convert Base64 encoded ASCII string to plain text.
Passing a Base64 encoded ASCII string to atob method will return plain text.
Example
atob("AkFwcHM0RGV2ZWxvcGVycy5jb20=")
Top comments (0)