Menu
Coddy logo textTech

Online Luau Compiler

Write, run, and share code snippets - no setup required.

Coddymain.luau
Output
Click Run to see the output here.

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 luau interpreter 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, and if-then-else expressions.
  • Stdin input is supported. io.read(), io.read("*n") and io.lines() all read from the playground's input box, so interactive scripts behave like running luau script.luau at a terminal - even though upstream Luau ships without the io library.
  • Syntax errors come back with line numbers from luau-compile, so a stray end or 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 with type, plus table.find, table.clone and table.freeze.
  • The Luau-only sugar: interpolate values into a backtick string, increment with +=, skip an iteration with continue, or pick a value inline with an if-then-else expression.

Online Luau compiler FAQ

Is the online Luau compiler free?
Yes, the Luau playground is free to use. No sign-up, no Roblox account, and nothing to install - open the page and run code.
Do I need Roblox Studio or the luau CLI installed?
No. You don't need Roblox Studio, CMake, or a local build of Luau. The online runner executes your script with the real luau interpreter and returns the output in seconds.
Does the playground type-check my Luau code?
It runs your code with 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?
No. This runs standalone Luau - the language - not the Roblox engine, so 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?
Yes. 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?
Edit the sample, press Run, and iterate. When you want something structured, Coddy's interactive Luau course covers the type system step by step - annotations, typed tables, unions, generics, strict mode - with exercises, two projects, and a certificate. The Luau cheat sheet is the quick reference to keep open alongside it.

Useful tools for Luau

Free, browser-based tools that pair well with the Luau Playground - all part of Coddy.