Skip to content
Astra
ProductDocumentationDownloadPricingCommunity
Sign inGet Astra

Explore Astra

Explore Astra

HomeProductPricingDocumentationDownloadRelease notesSystem status
Sign inDiscord
Roblox
IntroductionQuick start
Keys & licensingYour workspaceTroubleshooting
API reference
Closures
Debug
Environment
Metatables
Scheduler
Instances
Cache
Scripts
Signals
Filesystem
Input
Console
Cryptography
base64decodebase64encodecrypt.decryptcrypt.encryptcrypt.generatebytescrypt.generatekeycrypt.hashcrypt.hmaccrypt.randomlz4compresslz4decompress
JSON
Regex
System
Scene files
Drawing
UI library
Renderer
Requests
Network
API referenceCryptography

base64encode

Encodes binary data as Base64.

Syntax

Signature
base64encode(Data: string) -> string

Aliases

  • base64_encode
  • base64.encode
  • crypt.base64encode
  • crypt.base64_encode
  • crypt.base64.encode

Parameters

ParameterTypeDescription
DatastringBytes to encode.

Returns

TypeDescription
stringBase64 text.

Example

Luau
local Result = base64encode("hello")
print(Result)

Related functions

base64decodelz4compresslz4decompresscrypt.hash
Previousbase64decodeCryptographyNextcrypt.decryptCryptography

On this page

SyntaxAliasesParametersReturnsExampleRelated functions
Astra

A complete Luau workspace.
Your editor, scripts, and accounts in one place.

Get Astra

WindowsmacOSFree keyPricingRedeemDashboard

Product

EditorScript HubAccountsFeaturesComparison

Community

DiscordSystem statusSupport

Learn

DocumentationRelease notes

Developers

API referenceLuau LSPBenchmarks

Legal

TermsPrivacyCookiesRefund policy
System statusSupportTermsPrivacyCookies

© 2026 Astra. All rights reserved.