Power Automate (WDL) function
base64 — Power Automate (WDL) function reference
Encode text as base64.
Syntax
wdl
base64(value)
Examples
wdl
base64('hello')→ Base64 text
wdl
base64(triggerBody()?['fileContentText'])
→ A base64-encoded string
wdl
concat('Basic ', base64(concat(parameters('ApiUser'), ':', parameters('ApiPassword'))))→ A ready-to-use Basic auth header value
Common mistakes & gotchas
- base64() expects a plain string input; for file attachments prefer the connector's own base64/contentBytes output rather than round-tripping raw binary through base64() yourself.
- There is no line-wrapping — the output is a single continuous base64 string.
Related Workflow Definition Language functions
From Type conversion