.LUA

LUA File

Lua Script (source code)
Ask a question
QUICK ANSWER

A LUA file is source code written in Lua, a lightweight scripting language created in 1993. Any code editor (VS Code, Notepad++) opens it for reading or editing. To run it you need the Lua interpreter from lua.org, or the game or app the script belongs to. Running an untrusted .lua file carries real risk because Lua can execute system commands.

Developer: Roberto Ierusalimschy, Waldemar Celes, Luiz Henrique de Figueiredo - PUC-Rio, Brazil Category: Developer Files Open standard MIME: text/x-lua
OPENS ON Windows macOS Linux
Related: .DO · .MD · .HEX · .XSD

On this page

19k+ extensions indexed
Last reviewed Aug 12, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the LUA file format?

A .lua file contains a program or application extension source code, typically for a game or embedded application, written in the Lua scripting language. Source code is a collection of commands, instructions, and variable definitions written using a defined syntax. .lua is a plain-text file that can be opened and edited with any text editor; however, it is advised that such files be opened in editing tools that support syntax highlighting. A .lua file can contain a number of short commands, as well as a complete program or module code.

Lua syntax draws inspiration from Pascal, and the language uses associative arrays (called *tables*) and extensible semantics via metatables. Lua is described by its developers as:

  • Robust and tested - used by many acclaimed developers and projects, including Adobe Lightroom plugins, Wikipedia's Scribunto templating system, CCTV and embedded firmware, and games such as World of Warcraft (UI addons) and the original Angry Birds.
  • Fast - widely regarded as the fastest interpreted scripting language; LuaJIT, its just-in-time compiled variant, extends performance even further.
  • Cross-platform - Lua is distributed as platform-independent ANSI C source, running on Linux, Windows, macOS, Android, iOS, embedded systems, and mainframe computers.
  • Embeddable - well-documented and easy to integrate via its C API with code written in other languages, both compiled and scripting.
  • Simple and powerful - offers support for meta-features (metatables and metamethods) that can be extended as needed.
  • Lightweight and free - the interpreter adds roughly 300 KB to an application, and the language is released under the MIT licence.

Lua was created in 1993 by computer engineers Roberto Ierusalimschy, Waldemar Celes, and Luiz Henrique de Figueiredo at the Pontifical Catholic University of Rio de Janeiro (PUC-Rio). It is maintained by the LabLua research laboratory within that university's Computer Science Department. "Lua" means 'moon' in Portuguese. Multiple versions of the language have been developed since its creation; the current stable release is Lua 5.4, introduced in 2020, which brought a new generational garbage collector and a distinct integer subtype. Pre-compiled Lua bytecode is stored in .LUAC files and carries a binary \x1BLua magic header rather than readable text.

Security & safety

RISK: MEDIUM

A .lua file is source CODE, so reading it is safe but RUNNING an untrusted one is not: Lua scripts can call os.execute, io.open, os.remove and load native libraries, so a malicious script can delete files, exfiltrate data or run system commands - exactly how some game-cheat and "free script" .lua files attack users. Always read a downloaded .lua before running it, get game addons/mods only from reputable sources, and be wary of obfuscated or bytecode (.luac) scripts you can't inspect. Inside a sandboxed host (e.g. Roblox) the risk is lower but social-engineering 'scripts' are still a common scam vector.

Format details

in a nutshell
FULL NAMELua Script (source code)
DEVELOPERRoberto Ierusalimschy, Waldemar Celes, Luiz Henrique de Figueiredo - PUC-Rio, Brazilsince Lua created in 1993 at PUC-Rio (Pontifical Catholic University of Rio de Janeiro)
MIME TYPEtext/x-lua
TYPEPlain-text source code in the Lua programming language (UTF-8/ASCII)
STANDARDOpen · royalty-free

Programs that open LUA files

Windows3 apps
Notepad Open-source Open to read/edit with Lua syntax highlighting. (db's generic 'Text editor' entries point here / to Notepad++.)
Visual Studio Code Free Open the .lua for syntax-highlighted reading/editing; add the 'Lua' / sumneko Lua extension for IntelliSense and the Lua interpreter to run it.
Lua interpreter (lua.org) / LuaJIT Open-source To RUN a script: install Lua (or LuaJIT) and execute 'lua script.lua' in a terminal.
macOS3 apps
Visual Studio Code Free Open/edit the .lua with the Lua extension; run via the bundled terminal once Lua is installed (e.g. 'brew install lua').
TextMate / BBEdit / any code editor Open-source Open the .lua as text with Lua syntax highlighting (TextMate is the dated db entry; VS Code is the modern choice).
Lua interpreter / LuaJIT Open-source Install via Homebrew, then 'lua script.lua' to execute.
Linux2 apps
Lua interpreter / LuaJIT Open-source Usually packaged (apt/dnf install lua) - run 'lua script.lua'; edit with any editor.
Any code editor (VS Code, Vim, gedit) Free Open the .lua as text to read/edit; db's gedit/Vim entries are valid plain-text editors.

Technical details

deep spec
File typePlain-text source code (UTF-8 or ASCII)
MIME typetext/x-lua
File signature (magic bytes)None for source files - plain text with no binary header. Pre-compiled bytecode uses 1B 4C 75 61 (ESC + "Lua")
Syntax paradigmMulti-paradigm: procedural, object-oriented via metatables, and functional
Core data structureTable (associative array) - the sole compound type, serving as arrays, dictionaries, and objects
Comment syntax-- for single-line; --[[ ... --]] for block comments
Shebang supportSource file may begin with #!/usr/bin/env lua for direct execution on Unix-like systems
Standard runtimelua (interpreter), luac (bytecode compiler), luajit (JIT compiler)
Host embedding APICompact C API (lua_State, luaL_newstate, lua_call); bindings available for C++, Python, Java, and others
Standard libraryio, os, string, table, math, coroutine, package, utf8, debug - minimal footprint by design
Coroutine supportFirst-class asymmetric coroutines via coroutine.create / coroutine.resume / coroutine.yield
Garbage collectorIncremental tri-color mark-and-sweep; optional generational mode introduced in Lua 5.4
Numeric typesDistinct integer (64-bit by default) and float (double-precision) subtypes since Lua 5.3
Module systemrequire() resolves .lua source and binary C extensions (.so / .dll) via package.path / package.cpath
LicenceMIT licence (open source, free for any use including commercial)
ReleasedLua created in 1993 at PUC-Rio (Pontifical Catholic University of Rio de Janeiro)
Open standardYes · royalty-free
Specificationwww.lua.org

LUA conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with LUA files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about LUA files.

Frequently asked questions

How do I open a LUA file?
It's plain-text code - open it in any editor (VS Code, Notepad++, Sublime) to read or edit. To RUN it you need the Lua interpreter from lua.org, or the game/app that uses the script.
How do I run a Lua script?
Install Lua (or LuaJIT) and run 'lua script.lua' in a terminal. If the .lua is a game mod or app plugin, you don't run it directly - place it where the program expects (e.g. an addons/mods folder) and the host runs it.
What programs use .lua files?
Lots - World of Warcraft addons, Roblox, Garry's Mod and many game engines (Love2D, Defold, Solar2D), plus apps like Neovim, Wireshark, Redis, Nginx/OpenResty and Adobe Lightroom plugins. Lua is an embedded scripting language.
Is a LUA file safe to open?
Reading it in a text editor is safe. Running an untrusted .lua is risky - Lua can execute system commands and touch files, so inspect downloaded scripts first and only use mods/addons from trusted sources.
Can I convert a .lua to an .exe?
Not as a plain conversion, but you can bundle the script with the Lua interpreter into a standalone .exe using tools like srlua or luastatic. That packages it to run without a separate Lua install.
What's the difference between .lua and .luac?
.lua is editable source code; .luac is compiled Lua bytecode (binary, starts with ESC+'Lua'). Bytecode runs faster and hides the source but is tied to the Lua version - you create it with the 'luac' tool.

References

1Lua - official sitewww.lua.org
2Lua 5.4 Reference Manualwww.lua.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.NOMEDIAAndroid No-Media Marker File
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.DBSQLite Database File
9.EXEWindows Executable (Portable Executable)
10.AVIFAV1 Image File Format (AVIF)

Related extensions

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z