> ## 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

> 使用 Base64 decoder 解码 Base64 输入，并将解码后的字节作为 Lua string 返回。

<div className="real-function-page">
  ```lua theme={null}
  base64_decode(data: string): string
  ```

  ## 别名

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

  ## 参数

  <ParamField path={"data"} type={"string"} required>
    传递给 Base64 decoder 的 Base64 输入。
  </ParamField>

  ## 返回值

  <ResponseField name={"decoded"} type={"string"}>
    以显式长度的 Lua string 返回的解码字节。
  </ResponseField>

  ## 示例

  解码 Base64 数据并读取返回的 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))
  ```
</div>
