Power Automate (WDL) function
base64ToString — Power Automate (WDL) function reference
Decode base64 to text.
Syntax
wdl
base64ToString(value)
Examples
wdl
base64ToString(variables('enc'))→ "hello"
Common for decoding a base64-encoded JSON payload from a webhook.
wdl
json(base64ToString(triggerBody()?['data']))
→ A parsed object
wdl
base64ToString(items('Apply_to_each')?['contentBytes'])→ The decoded text content
Common mistakes & gotchas
- Assumes UTF-8 text underneath the base64 — decoding base64 that actually represents binary content (e.g. an image) produces unusable garbled text, not an error.
- Malformed base64 input (wrong padding/invalid characters) throws an InvalidTemplate error rather than returning a partial result.
Related Workflow Definition Language functions
From Type conversion