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

> Lua string のバイトを Base64 encoder でエンコードし、= padding を使い、改行は入れません。

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

  ## エイリアス

  * `base64encode`
  * `base64.encode`
  * `crypt.base64.encode`
  * `crypt.base64_encode`
  * `crypt.base64encode`

  ## 引数

  <ParamField path={"data"} type={"string"} required>
    Base64 encoder に渡される Lua string のバイト。
  </ParamField>

  ## 戻り値

  <ResponseField name={"encoded"} type={"string"}>
    Lua string として返される Base64 出力。
  </ResponseField>

  ## 例

  Lua string をエンコードし、Base64 出力を表示します。

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

  print(encoded)
  print(base64encode("hello world"))
  print(base64.encode("hello world"))
  ```
</div>
