encode and decode file base64 javascript code example Example: javascript base64 decode var decodedString = atob(encodedString);