Free Online Lua Playground / REPL
Result
Console output
FAQ
Your code runs directly in your browser using Fengari, a pure-JavaScript implementation of the Lua 5.3 VM. Nothing is sent to a server, so it works offline and your code stays on your machine.
Anything you pass to print() appears in the Console output panel. There's no separate "return value" concept for a whole script the way some other playgrounds show a Result, since Lua scripts typically just print() what they want to show.
Yes. Fengari ships the standard library (string, table, math, os, coroutine, and more), so string formatting, table iteration, and coroutines all work as in a native Lua interpreter. A few OS/IO-heavy functions behave differently or are unavailable in a browser sandbox (there's no real filesystem or shell to call into).
The playground aborts any script that runs for more than 2 seconds and reports a timeout error, so a mistake like "while true do end" can't freeze the page.
Yes. Click Share to copy a URL that encodes your current code, so anyone who opens the link sees the same program.
Chat opens an AI assistant embedded in the playground. It can explain Lua concepts, debug errors, and write code directly into the editor, then run it to verify the result.