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

> Kodiert die Bytes eines Lua-Strings mit Base64 encoder, mit = padding und ohne Zeilenumbrueche.

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

  ## Aliase

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

  ## Argumente

  <ParamField path={"data"} type={"string"} required>
    Lua-String-Bytes, die an Base64 encoder uebergeben werden.
  </ParamField>

  ## Rückgaben

  <ResponseField name={"encoded"} type={"string"}>
    Base64-Ausgabe, die als Lua-String zurueckgegeben wird.
  </ResponseField>

  ## Beispiel

  Kodiere einen Lua-String und gib die Base64-Ausgabe aus.

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

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