> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# base64_decode

> Decodes Base64 input with Base64 decoder and returns the decoded bytes as a Lua string.

Decodes Base64 input with Base64 decoder and returns the decoded bytes as a Lua string.

## Syntax

```lua theme={null}
base64_decode(data: string): string
```

## Aliases

* `base64decode`
* `base64.decode`
* `crypt.base64.decode`
* `crypt.base64_decode`
* `crypt.base64decode`

## Arguments

| Name   | Type     | Required | Description                            |
| ------ | -------- | -------- | -------------------------------------- |
| `data` | `string` | Yes      | Base64 input passed to Base64 decoder. |

## Returns

| Name      | Type     | Description                                                  |
| --------- | -------- | ------------------------------------------------------------ |
| `decoded` | `string` | Decoded bytes returned as a Lua string with explicit length. |

## Example

Decode Base64 data and read the returned Lua string.

```lua theme={null}
local encoded = base64_encode("hello world")
local decoded = base64_decode(encoded)

print(decoded)
print(base64decode(encoded))
print(base64.decode(encoded))
```
