What is the LUAU file format?
A .luau file holds source code written in Luau, the scripting language Roblox derived from .lua (Lua 5.1). Roblox Corporation first shipped Luau to developers in 2019 and released it as open source under the MIT License in 2021. The file is plain UTF-8 text, so any editor can read it.
Luau keeps Lua 5.1 compatibility while adding a gradual type system, type inference, string interpolation, and sandboxing. Inside Roblox Studio, every Script, LocalScript, and ModuleScript is saved to disk as a .luau file. The separate extension lets editors and linters recognize Luau syntax instead of treating it as ordinary Lua. Beyond Roblox, studios such as Remedy and Digital Extremes embed Luau in their own game engines, so you may meet .luau files outside the Roblox world too.
Security & safety
RISK: MEDIUMA .luau file is plain-text source code and cannot run on its own; it only executes inside Roblox, the luau runtime, or another host that embeds Luau. Like any script, code from an untrusted source can perform unwanted actions when run, and the Roblox community has seen malicious model scripts (backdoors) shipped inside shared assets. Read the source before running it, and be cautious with obfuscated or copy-pasted scripts.
Format details
in a nutshellPrograms that open LUAU files
.luau on disk. .luau file directly; install the Luau Language Server extension for syntax highlighting, type checking, and autocomplete. luau script.luau in a terminal to execute the file, or luau-analyze script.luau to type-check and lint it. .luau files. .luau file; add the Luau Language Server extension for full language support. luau script.luau or analyze it with luau-analyze script.luau from Terminal. .luau file and install the Luau Language Server extension for highlighting and diagnostics. luau script.luau to execute or luau-analyze script.luau to check the file. .luau; edit them in the browser-linked Studio environment. Technical details
deep spec| Encoding | UTF-8 plain text (ASCII-compatible) |
| Byte order | N/A (text, no multibyte header) |
| Container | None; flat source file |
| Typical size | A few hundred bytes to tens of kilobytes |
| Structure | Human-readable Luau source code. May start with an optional mode directive comment (--!strict, --!nonstrict, or --!nocheck), followed by statements, function and type definitions. Type annotations on variables, parameters and return values are optional. |
| Integrity | None built in |
| Platforms | Windows, macOS, Linux, Web (Roblox platform) |
| Language Derived From | Lua 5.1 |
| Type System | Gradual, structural type inference (opt-in annotations) |
| Runtime | C++ Luau VM with rewritten interpreter, incremental garbage collector, and native x64/ARM64 code generation |
| Line Terminator | LF or CRLF |
| Notes | Luau is backward compatible with Lua 5.1 source, so many .luau files also run under a plain Lua 5.1 interpreter unless they use Luau-only syntax such as type annotations, string interpolation, or the continue keyword. |
| Released | 2019 |
| Latest version | N/A (rolling releases; no versioned file format) |
| Open standard | Yes · royalty-free |
| Specification | luau.org |
LUAU conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about LUAU files.
Frequently asked questions
What is a .luau file?
How do I open a .luau file?
luau command-line tool.What is the difference between .luau and .lua?
.luau marks files written for Roblox's Luau dialect, which adds type annotations and other features. Roblox Studio saves its scripts as .luau, while .lua is used by standard Lua and older Roblox exports.Can I run a .luau file outside Roblox?
luau binaries from the project's GitHub releases and run luau yourfile.luau. Scripts that call Roblox-specific APIs will not work outside the Roblox engine.