Lua Bytecode Disassembler
Disassemble compiled Lua 5.1 bytecode (.luac files) to inspect virtual machine instructions, function prototypes, constants, and local variables. Upload a .luac file or paste its hex dump to get a full structured disassembly with navigable function tree and detailed opcode decoding. All processing is local and private.
No bytecode loaded
Upload a compiled .luac file or paste its hex dump to begin disassembly
Why Use Our Lua Bytecode Disassembler?
Lua 5.1 Bytecode Parsing
Parse and disassemble Lua 5.1 compiled bytecode (.luac files) with full support for all 38 opcodes, ABC/ABx/AsBx instruction modes, and proper decoding of constants, upvalues, locals, and line number information.
Nested Function Tree
Explore the full function prototype hierarchy with an interactive tree view. Navigate between nested closures, view per-function instruction listings, and drill down into child functions with one click.
Detailed Instruction Decoding
Each instruction is fully decoded with raw hex, opcode name, register operands, and a human-readable comment explaining its effect. Special highlighting for return and tail-call instructions makes control flow easy to follow.
100% Browser-Local Processing
All bytecode parsing and disassembly happens entirely in your browser. Your .luac files and hex dumps never leave your device. No uploads to any server, no signup required, and no usage limits. Free forever.
Common Use Cases for Lua Bytecode Disassembler
Reverse Engineering Lua Applications
Disassemble compiled Lua scripts from games, embedded systems, and applications to understand their logic. The bytecode disassembler reveals the exact instructions and control flow, helping you analyze proprietary or obfuscated Lua code.
Learning Lua Virtual Machine Internals
Use the disassembler as an educational tool to understand how the Lua VM executes code. See how high-level Lua constructs like loops, function calls, closures, and table operations translate to bytecode instructions.
Security Auditing & Malware Analysis
Analyze compiled Lua scripts for malicious behavior. Disassemble potentially harmful .luac files to inspect their instructions, detect suspicious constant strings, and understand the full scope of embedded logic without executing it.
Lua Obfuscator Verification
Test the effectiveness of Lua obfuscation tools by disassembling the output. Verify that variable renaming, string encoding, and control flow obfuscation are properly applied to the bytecode level, not just the source level.
Compiler & Language Development Research
Compare bytecode output from different Lua compilers and versions. Understand optimization decisions, instruction selection, and how different Lua constructs compile differently across versions 5.1 through 5.3.
Legacy Code Recovery & Documentation
Recover understanding of undocumented or archived Lua modules by disassembling their compiled forms. The detailed instruction listing, constant tables, and local variable information help reconstruct the original code semantics.
Understanding Lua Bytecode Disassembly
What is Lua Bytecode Disassembly?
Lua bytecode disassembly is the process of converting compiled Lua bytecode (.luac files) back into a human-readable sequence of virtual machine instructions. When you compile a Lua script with luac or run it through a Lua interpreter, the source code is translated into an intermediate bytecode format that the Lua VM executes. Disassembly reverses this compiled format to reveal the exact instructions, constants, upvalues, and function prototypes that make up the compiled program, without requiring access to the original source code.
How Our Lua Bytecode Disassembler Works
- Input: Upload a compiled .luac file or paste its hexadecimal representation into the input panel. The tool accepts Lua 5.1 bytecode format, which is the most widely supported version for bytecode analysis and reverse engineering of compiled Lua scripts.
- Parsing: The disassembler reads the binary header to verify the signature, version, endianness, and data type sizes. It then recursively parses all function prototypes, decoding each 32-bit instruction into its opcode and operands (A, B, C, Bx, or sBx depending on the instruction mode).
- Output: The structured output shows the header information, a navigable function tree, detailed per-function prototypes (parameters, stack size, vararg status), a full instruction listing with comments, a constants table, and local variable scopes.
What Gets Displayed During Disassembly
- Header Information: Bytecode signature, Lua version, endianness, and data type sizes (int, size_t, instruction, number) that describe the bytecode format.
- Function Tree: A hierarchical view of all function prototypes in the bytecode file, with line ranges and instruction counts for quick navigation between nested closures.
- Instruction Listing: Each instruction shows its address offset, raw hex value, opcode name (MOVE, LOADK, ADD, CALL, etc.), decoded disassembly with register/constant references, and a plain-English comment explaining the operation.
- Constants & Locals Tables: All constant values (numbers, strings, booleans, nil) used by the function, plus local variable scopes with their start and end program counter positions.
Privacy, Security & Availability
Your privacy is fully protected. All Lua bytecode disassembly processing happens entirely within your browser using JavaScript - no bytecode data is ever uploaded to any server, stored, logged, or shared. The tool requires no account creation, no signup, and imposes no file size limits. It is completely free with no premium tiers, usage caps, or hidden charges. You can use it as often as needed for security research, reverse engineering, education, or any other purpose.
Related Tools
Lua Deobfuscator & Beautifier
Detect and reverse common Lua obfuscation techniques including string encoding, variable renaming, and control flow flattening. Format and beautify deobfuscated Lua code.
Java Bytecode Viewer
View Java bytecode instructions, constant pool, stack frames, and line number tables from .class files. Disassemble JVM instructions with full mnemonics.
.NET IL Viewer
View .NET Intermediate Language (IL) instructions for C# and VB.NET code. Browse opcodes, operand types, method bodies, and token resolution.
Rust Macro Expansion Visualizer
Simulate and visualize Rust macro expansion. See how println!, vec!, format!, and custom macro_rules! definitions expand into generated code.
Frequently Asked Questions About Lua Bytecode Disassembler
A Lua bytecode disassembler is a tool that converts compiled Lua bytecode (.luac files) into a human-readable sequence of virtual machine instructions. It shows the exact opcodes, register operands, constants, and function prototypes that the Lua VM executes, allowing you to understand the compiled version of a Lua script without access to the original source code.
The disassembler fully supports Lua 5.1 bytecode format, which is the most widely decompiled and analyzed version. Lua 5.1 has 38 opcodes covering all common operations like moves, arithmetic, table access, function calls, loops, and closures. The parser validates the bytecode signature and version, and will report an error for unsupported versions.
You can upload a .luac file directly using the upload button, or you can paste a hex dump of the bytecode into the text area. The tool will automatically parse the binary data and display the structured disassembly. For hex dumps, the input should be a plain hexadecimal string with optional spaces or line breaks between bytes.
Yes. The function tree panel shows all function prototypes in the bytecode file, including nested closures. Click on any function in the tree to switch the instruction listing and constant table to that function. This is especially useful for analyzing obfuscated Lua code that uses multiple nested closures.
The output includes the bytecode header (signature, version, endianness, data sizes), a function tree with all prototypes, per-function details (parameters, stack size, vararg status), a full instruction listing with raw hex, opcode names, decoded operands, and comments, a constants table with all number/string/boolean/nil values, and a local variables table with scope information.
Lua 5.1 uses three instruction encoding modes. ABC mode encodes three operands: A (8-bit destination register), B (9-bit source register or constant index), and C (9-bit second source or options). ABx mode encodes A and a combined Bx operand (18 bits) used for larger indices into the constant table. AsBx mode is a signed variant of ABx used for jump offsets in JMP, FORLOOP, and FORPREP instructions.
Absolutely. All bytecode parsing and disassembly happens entirely within your browser using JavaScript. Your .luac files and hex dumps never leave your device and are never sent to any server. No account is required, no data is stored, and no tracking occurs. This makes the tool safe for analyzing proprietary or sensitive compiled Lua scripts.
Obfuscated Lua bytecode may show unusual patterns like excessively long constant strings (suspected encoded payloads), a high number of nested closures, redundant MOVE instructions, heavy use of GETUPVAL/SETUPVAL for indirect variable access, or opaque control flow with many JMP instructions. The disassembler helps spot these patterns by showing the full instruction sequence.
Yes, 100% free. There is no signup, no premium tier, no usage limits, and no file size caps. The tool runs entirely in your browser and will always be free to use on Aback Tools.