Online Luau Compiler
Write, run, and share code snippets - no setup required.
Run Luau online in your browser
A free online Luau playground and code runner. Write Luau - Roblox's gradually typed Lua dialect - press Run, and the real luau interpreter executes it in seconds. No Roblox Studio, no building the CLI from source, nothing to install.
The editor is built on the same engine as VS Code, with Lua-based syntax highlighting (the closest grammar to Luau). Your code runs against the upstream luau binary on Alpine Linux with the standard libraries available - string, table, math, os, coroutine and bit32 - so type annotations, string interpolation, +=, continue and if-then-else expressions all work exactly as they do in the language.
What makes this Luau playground useful
- Instant Luau execution - write code, press Run, and see output from the real
luauinterpreter in seconds. No Roblox Studio, no CMake build, no toolchain. - Luau-specific syntax runs as written: type annotations (
local hp: number = 100), typed tables, generics, backtick string interpolation, compound assignment (+=,..=),continue, andif-then-elseexpressions. - Stdin input is supported.
io.read(),io.read("*n")andio.lines()all read from the playground's input box, so interactive scripts behave like runningluau script.luauat a terminal - even though upstream Luau ships without theiolibrary. - Syntax errors come back with line numbers from
luau-compile, so a strayendor a malformed type annotation is reported before anything runs.
What you can try in the Luau playground
- Type annotations and inference: annotate a function, pass the wrong type, and see how far the runtime lets you go - a fast way to build intuition about what types do and don't do at run time.
- Typed tables: arrays (
{number}), maps ({[string]: number}), and named shapes withtype, plustable.find,table.cloneandtable.freeze. - The Luau-only sugar: interpolate values into a backtick string, increment with
+=, skip an iteration withcontinue, or pick a value inline with anif-then-elseexpression.
Online Luau compiler FAQ
Is the online Luau compiler free?
Do I need Roblox Studio or the luau CLI installed?
luau interpreter and returns the output in seconds.Does the playground type-check my Luau code?
luau and reports syntax errors, but it does not run the type checker - that's luau-analyze's job, and Luau types are erased at run time either way. So --!strict won't stop a script here: annotations parse and run, and a wrong type only shows up when it causes a real runtime error. It's still a good way to learn the syntax before wiring up an editor with type checking.Can I use Roblox APIs like game or Instance.new?
game, workspace, Instance.new, services and events aren't available. Everything that is part of the language itself works, which is most of what you need while learning.Does the Luau playground support io.read() and stdin?
io.read() for a line, io.read("*n") for a number, and io.lines() for iterating all read whatever you type into the input box. Upstream Luau removes the io library for sandboxing, so Coddy restores those input functions on top of it - the sandboxing here is done by the runner instead.How do I learn Luau after trying the playground?
Useful tools for Luau
Free, browser-based tools that pair well with the Luau Playground - all part of Coddy.