---
title: digest.base64url_decode
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/cryptographic/digest-base64url-decode
---

```
STRING digest.base64url_decode(STRING s)
```

**Available in:** all subroutines

Returns the original representation of the `base64url`-encoded string `s`
as produced by `digest.base64url()`.

Although the input string may contain encoded binary data, the resulting output
is treated as a string.
As such, any _NUL_ characters in the string will appear as a truncated result.

Padding is optional, and may be omitted. Decoding stops at the first
instance of a `=` character, and any subsequent data is ignored.
This is the only difference to the
`digest.base64url_nopad_decode()` function.

See `digest.base64_decode()`
for handling invalid characters and the behavior of padding.

## Example

```vcl
declare local var.base64url_decoded STRING;
set var.base64url_decoded = digest.base64url_decode("zprOsc67z47PgiDOv8-Bzq_Pg86xz4TOtQ==");
# var.base64url_decoded is now "Καλώς ορίσατε"
```
