string to base64 browser code example Example: javascript base64 decode var decodedString = atob(encodedString);