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

> Mengenkode byte Lua string dengan Base64 encoder, memakai = padding dan tanpa line break.

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

  ## Alias

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

  ## Argumen

  <ParamField path={"data"} type={"string"} required>
    Byte Lua string yang diteruskan ke Base64 encoder.
  </ParamField>

  ## Return

  <ResponseField name={"encoded"} type={"string"}>
    Output Base64 yang dikembalikan sebagai string Lua.
  </ResponseField>

  ## Contoh

  Enkode Lua string dan cetak output Base64.

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

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