Online Lua Compiler
Write Lua and run it in your browser. Output appears next to your code, and your code stays on your device.
Three files, one preview. Press Run.
Ln 1, Col 1
Run Lua online
Write Lua code and press Run. It runs in your browser with WebAssembly, so nothing is uploaded. print, io.write and io.read work; the Input tab feeds io.read.
Press Tab after a few letters, such as for, function or if, to write the whole line. If the program stops with an error like "attempt to call a nil value", a card explains it and suggests a likely name.
Frequently asked questions
Which Lua version is it?
Lua 5.4 compiled to WebAssembly.
Can I read input?
Yes. Use io.read(); it reads the next line from the Input tab.
Can I load files or modules?
No. The browser sandbox has no files. Write everything in one script.
Looking for another language? Open the full code editor with 100+ languages.