Lua Runner
Free online Lua runner. Write and run Lua 5.4 code instantly in your browser with print output, error stack traces and infinite-loop protection. No install.
How do I run Lua code online with this tool?
Type or paste your code into the editor, then press the Run button or use Ctrl+Enter. The print and io.write output appears immediately in the output panel below, so you can iterate on snippets without any setup.
Which Lua version does the runner use?
It runs Lua 5.4, the current mainstream release, compiled to WebAssembly with the wasmoon project. Language semantics, the standard libraries and the bytecode VM behave the same as a desktop lua 5.4 build.
Is my code uploaded to a server?
No. The whole interpreter runs locally inside your browser as a WebAssembly module. Your code never leaves your device, which makes the tool safe for private snippets and usable offline once the page has loaded.
What happens if my code has an infinite loop?
A Lua debug hook counts executed instructions and aborts the run after roughly two seconds worth of work. You get a clear timeout message instead of a frozen tab, and the engine stays usable for the next run.
How are errors reported?
Compile errors and runtime errors are shown in red in the output area together with the Lua stack trace, including the line number in your code, so problems are easy to locate. A toast summarizes the first line of the error.
Which standard libraries are available?
The full Lua 5.4 standard set is loaded: base, string, table, math, coroutine, utf8 and a sandboxed os/io. There is no access to your real file system and no networking, and require only works for the bundled modules.
Can I use it on a phone or tablet?
Yes. The layout is responsive: the editor, buttons and output panel adapt to small screens, and the on-screen keyboard works for typing short scripts when you are away from a computer.
Who is this Lua runner useful for?
Beginners learning Lua syntax, developers testing small logic or string/table experiments, and anyone who wants to check a snippet without installing Lua. Game modders working with Lua-based scripting also use it for quick syntax checks.
How to Use Lua Runner
This runner executes Lua 5.4 entirely inside your browser with a WebAssembly build of the official interpreter — nothing is uploaded and no account is needed. Pick an example or write your own code, press Run, and the print output appears below with runtime errors highlighted in red. An instruction limit of about two seconds safely interrupts infinite loops.
- Pick a starting point from the Examples dropdown: Hello World, Numeric loops, Tables & string library or the Infinite loop timeout demo — it loads straight into the editor.
- Write or edit Lua code in the editor. Ctrl+Enter runs the current code without touching the mouse.
- Press the Run button (play icon) to execute. print and io.write output appears in the Output panel and the elapsed time is shown underneath.
- If something fails, the error is shown in red together with the Lua stack trace, including the exact line number in your code.
- Use Clear output (eraser icon) to wipe the output panel between runs — the code in the editor is kept.
- The pill next to the header shows the engine status and the exact Lua version once loaded, e.g. Lua 5.4.
Try the Infinite loop (timeout demo) example: the run stops after roughly two seconds with a clear timeout message instead of freezing the page — that is the built-in instruction limit doing its job.
Related Tools
- Code Playground Online HTML, CSS and JavaScript playground with live preview, editor with line numbers and a captured console. Test snippets instantly and download the result as a single HTML file - fully in your browser.
- JSON Validator Validate JSON syntax instantly with detailed error messages and line numbers. Free online tool that runs 100% in your browser.
- Chmod Calculator Free online chmod calculator to visualize and calculate Linux file permissions with checkboxes. Instantly convert between numeric (755, 644) and symbolic notation (rwxr-xr-x). Supports special permissions like setuid, setgid, sticky bit.
- ASCII Table Complete ASCII character encoding reference with decimal, hexadecimal, octal, binary codes, HTML entities, and character descriptions. Search and filter instantly.
- HTTP Request Tester Test REST APIs directly in your browser. Send GET, POST, PUT, DELETE requests with custom headers, body, and query parameters. View response status, headers, and JSON body instantly.
- .htaccess Generator Generate Apache .htaccess rules for redirects, rewrites, security headers, caching, compression, and more.
- Robots.txt Generator Free online robots.txt generator. Create and customize robots.txt files to control search engine crawling, manage crawler access, and optimize your site's SEO with an easy visual editor.
- Sitemap Generator Free online XML sitemap generator. Add URLs, set priorities, change frequencies and create SEO-friendly sitemaps instantly in your browser.