Decodes a Base64 string back into raw data.
class Utilities method .base64Decode()
Utilities is the Apps Script service.
.base64Decode() is the method name you will see after a dot in your code.
What it does
Why it's used
- Read Base64 attachments or API fields back into raw data.
- Reverse encoding from external systems.
Common errors
- Forgetting parentheses on base64Decode. Write Utilities.base64Decode(), not Utilities.base64Decode or base64Decode by itself.
- Skipping dots between chained calls. Each step needs a dot, like Utilities.base64Decode().
- Adding spaces where they do not belong. Write Utilities.base64Decode(), not Utilities .base64Decode(), Utilities.base64Decode (), or Utilities . base64Decode().
- Wrong capitalization. Use Utilities and base64Decode, not utilities or base64decode.
Explore
Related methods
-
.base64Encode()
Encodes a string or bytes as Base64.
-
.computeDigest()
Returns a hash digest of a string or blob.
-
.newBlob()
Creates a blob object from text or binary data.
-
.jsonParse()
Parses a JSON string into a JavaScript object.
-
.jsonStringify()
Converts a JavaScript object into a JSON string.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.
Related blog posts
Written guides about Utilities.base64Decode().
What's Better Than Google Sheets?
Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →How to Send Google Forms Entries Automatically with Apps Script
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →Explore Coding in Google Sheets
Did you know you can actually code in Google Sheets?
Read post →