Lua decompiler that turns Lua 5.1 .luac bytecode back into readable source, with loops, if/elseif chains, and/or logic and local names. Free, in-browser.
Also known as: lua decompiler · lua decompiler online · luac decompiler · luac to lua · decompile luac file · lua 5.1 decompiler · lua bytecode to source · online lua decompiler · luac decompiler online · unluac online
Lua decompiler that turns Lua 5.1 .luac bytecode back into readable source, with loops, if/elseif chains, and/or logic and local names. Free, in-browser.
Is Lua Decompiler free to use?
Yes. Lua Decompiler is completely free with no usage limits, and there is no paid tier required to use it.
Do I need an account to use Lua Decompiler?
No. Lua Decompiler works immediately in your browser with no signup, login, or email address required.
Decode Discord, Twitter/X, and Instagram snowflake IDs into timestamps and worker IDs instantly in your browser. Free, no signup, bulk decoding supported.
Share code snippets, logs, and text with a shareable link. Syntax highlighting for 30+ languages, expiration controls, and password protection for Pro users.
Drop a .luac, .lub or luac.out file here, or click to browse
Read locally with the File API. Nothing is uploaded or run.
Decompiled Lua Source
About Lua Decompiler
A Lua decompiler is used to turn a compiled .luac file back into readable Lua source when the original script is lost or was only shipped as bytecode. It rebuilds statements, loops, if/elseif chains, and/or expressions, closures and table constructors from Lua 5.1 bytecode, keeps local names when the chunk has debug info, and runs entirely in your browser.
Key Features
Rebuilds while, repeat-until, numeric and generic for loops, if/elseif/else chains, break and do ... end blocks from the jump structure
Recovers and/or/not expressions, comparisons, multiple assignment, method calls (obj:method()), varargs and table constructors with mixed array and keyed items
Keeps the original local and upvalue names when the chunk has debug info, and invents readable ones (v1, a1, i1) for chunks stripped with luac -s
Writes function a.b:c() and local function sugar, and keeps evaluation order intact so the output recompiles to the same behavior
Accepts a file, or pasted hex, base64, a {27,76,117,97,...} byte list or a loadstring("\27LuaQ...") string
A function it cannot rebuild becomes a stub that calls error(), with the reason listed, so the rest of the file still decompiles
Use Cases
Recover the source of an old World of Warcraft addon, LÖVE game or embedded device script that only survives as a .luac file
Read what a loadstring() bytecode payload in a Garry's Mod or FiveM server script really does before you run it
Check that a build pipeline running luac -s did not change program behavior by decompiling and diffing the result
Port a Lua 5.1 module whose source is gone to a newer Lua version, starting from decompiled code instead of a rewrite
Learn how Lua compiles control flow by comparing your source with what comes back from its bytecode
Supported Formats
.luac
.lub
luac.out
Lua 5.1 bytecode
stripped chunks (luac -s)
hex
base64
byte list
Lua escaped string
Related Keywords
lua decompiler
lua decompiler online
luac decompiler
luac to lua
decompile luac file
lua 5.1 decompiler
lua bytecode to source
online lua decompiler
luac decompiler online
unluac online
Can a Lua decompiler recover the original source code?
Mostly, but not word for word. Bytecode keeps every operation, constant and string, so the program's behavior comes back exactly, and with debug info the local and upvalue names come back too. Comments, blank lines and formatting were never compiled, so they are gone, and code the compiler simplified comes back simplified: 2 * 3 returns as 6, and if a then if b then becomes if a and b then. On a stripped chunk the local names are invented. This tool reads PUC Lua 5.1 bytecode, the version most game mods and older scripts use. LuaJIT and Roblox Luau use different formats, and Lua 5.2 to 5.5 chunks can be read as instructions in the Lua Bytecode Viewer.
Nothing leaves your browser
Files are read with the File API and pasted text is decoded in JavaScript. The bytecode is decompiled, never executed, and nothing is uploaded. Auto-save keeps only the pasted text (or a small file as base64) and the decompiled source.