Encoding and decoding a string in Base64 is a useful way of obfuscated strings to either a document (your webpage) without the need to worry about quotes or characters breaking things. The atob() function decodes a string of data which has been encoded using base-64 encoding. On the other hand, the btoa() function creates a base-64 encoded ASCII string from a “string” of binary data.
These function will encode strings and numerics, but only decode strings. If an unsuitable value is supplied it will return false.