Write, run, and explore — right in your browser.
Lua Sandbox lets you write and run Lua 5.3 code directly in your browser. Enter a script or choose an example, run it, and review the console output and any errors. This edit-run-check workflow helps you understand how variables, loops, functions, and tables behave. You can also inspect global variables or use canvas drawing helpers to explore visual output.
The inspector shows custom global variables and tables after a successful run. Variables declared with local do not appear there. Prefer local variables for ordinary scripts, and use print to check their values.
Isolated mode starts each execution with a fresh Lua state. Persistent mode keeps globals between executions, which is useful for interactive experiments but can make results depend on earlier commands.
A shared link contains the current editor’s code in its URL fragment. Anyone with that link can read the snippet, so remove passwords, tokens, and personal information before sharing. Download important scripts as Lua files to keep a separate copy.
This playground runs Lua 5.3 through a browser runtime. Scripts that depend on native modules, operating-system commands, or another application’s APIs may not work here. The canvas helpers belong to this playground and are not part of standard Lua.
No. Lua Sandbox runs Lua 5.3 code directly in your browser. Enter your code or choose an example, then click Run to view the results.
Isolated mode starts each execution with a fresh Lua state. Persistent mode keeps global variables between executions, allowing later scripts or console commands to use values created earlier.
The inspector displays custom global variables and tables after a successful run. Variables declared with local do not appear there. Use print to display local values in the console.
Yes. You can import a Lua file or drag it onto the editor, download the current script as a .lua file, and use Share to copy a link containing the current editor’s code. Anyone with that link can read the snippet.
Scripts that depend on Roblox or Love2D APIs will not run unchanged because those environments are not included. You can test compatible Lua logic that does not rely on their features. Roblox also uses Luau, which differs from Lua 5.3.
Yes. The app provides canvas drawing helpers and drawing examples. Run code that uses these helpers to view graphics in the Canvas tab, then save the canvas as a PNG. These helpers are specific to this playground and are not part of standard Lua.