Lua Minifier

Compress your Lua code by removing whitespace, comments, and formatting instantly.

Input Lua
Minified Output
Minified output will appear here...
info

About Lua Minifier

Lua scripts used in game engines, embedded systems, and configuration files are often written with comments, generous spacing, and indentation for readability. When deploying Lua scripts to production — especially in resource-constrained environments like game mods or IoT devices — reducing file size matters.

Our Lua Minifier strips all comments (both line and block), collapses whitespace, and compacts your Lua code into the smallest valid form. All processing runs locally in your browser — your code never leaves your machine. Use it to optimize Roblox scripts, compress game mods, or reduce addon file sizes.

help

How to Use

01

Paste Your Lua Code

Copy your formatted Lua script and paste it into the input editor on the left.

02

Minify

Click "Minify" to strip all comments and whitespace from your Lua code.

03

Copy the Result

Review the size savings, then copy the minified Lua or download it as a .lua file.

quiz

Frequently Asked Questions

What is Lua Minification? expand_more
Lua minification removes unnecessary whitespace, line breaks, indentation, and comments from Lua scripts without changing their functionality. The result is compact code that executes identically to the original.
Will minifying break my Lua script? expand_more
No. The minifier only removes characters that Lua ignores during execution — whitespace and comments. All code logic, variable names, and string literals are preserved exactly as written.
Is my Lua code secure? expand_more
Yes. All processing runs entirely in your browser. Your code never leaves your machine and is not sent to any external server.
Does this work with Roblox Luau scripts? expand_more
Yes. The minifier handles standard Lua syntax which covers Roblox Luau, Love2D, and other Lua-based environments. Comments and whitespace are safely removed regardless of the Lua variant.