Editor only — Lua is not executed here
Online Lua Editor
Lua usually lives inside something else — a game engine, an editor, a proxy — so a quick standalone place to write and read it is genuinely handy. You get proper highlighting for tables, closures and long strings; the interpreter stays wherever the script will actually run.
Can you run Lua here? No — and that is deliberate.
AltF Code edits Lua; it does not interpret it. There is no Lua VM in this page. Run the script with lua script.lua, or inside whatever host embeds Lua for you — a game engine, Neovim, Redis or an nginx module.
A browser can execute only HTML, CSS and JavaScript. Everything else on AltF Code is a full editing surface — real highlighting, real editing, real files — and this page says so instead of advertising a compiler that does not exist.
Lua in the editor
A file named main.lua is highlighted with the lua grammar — the same grammar Visual Studio Code uses.
local orders = {
{ id = 1, total = 42.5 },
{ id = 2, total = 17.25 },
}
local sum = 0
for _, order in ipairs(orders) do
sum = sum + order.total
end
print(string.format("%d orders, total %.2f", #orders, sum))
What you can do with Lua here
- Write a config or plugin script with proper highlighting for tables, closures and long strings.
- Read a Lua snippet from a game mod, a Neovim config or a nginx rule on any machine.
- Download a .lua file ready to drop into the host application that runs it.
Lua in this editor — the specifics
| File extension | .lua |
|---|---|
| Syntax grammar | Monaco "lua" — bundled, no download |
| Code intelligence | Syntax highlighting, bracket matching, comment toggling and word-based suggestions — no type checking |
| Runs in this page | No — editing and highlighting only |
| Run it locally with | lua main.lua |
| Cost / account | Free, no sign-up; files stay in your browser |
Lua editor — common questions
- Can I run Lua here?
- No. There is no Lua VM in a browser tab, so nothing is interpreted or executed. Run the file with the lua binary or inside the application that embeds Lua for you.
- Does it support LuaJIT or Luau syntax?
- The highlighting is standard Lua, which covers most LuaJIT and Luau code readably. Dialect-specific type annotations are not validated, since nothing is parsed for correctness here.
- Is it free and private?
- Yes: free, no account, and files saved only in your own browser's local storage.
- What is a good workflow?
- Write and tidy the script here, download it, then load it in your engine, editor or server — the environment that defines the APIs your script calls.
Start writing Lua
The editor opens with a blank file and a cursor. Nothing to install, nothing to sign up for, and your work is saved in your own browser.
Open AltF Code