Lua Formatter

Processed in your browser

Format messy Lua for reading or minify it for smaller snippets — entirely in your browser, without executing the code.

Source

Input code

Waiting for code
Mode

Choose beautify or minify, then format.

Output

Formatted code

0 charactersLua / Luau

Beautify vs minify

Beautify adds indentation around common Lua keywords such as function, then, do, and end. Minify removes comments and extra whitespace while preserving strings and long-bracket literals.

This is a lightweight formatter for snippets and scripts, not a full Luau-aware pretty-printer. Review the output before shipping production code.

Frequently asked questions

Does this run or validate my script?

No. It only rearranges text. Syntax errors may remain after formatting.

Will minify break string literals?

Labmorf preserves quoted strings and long-bracket literals while removing comments and collapsing whitespace elsewhere.

Is Roblox Luau fully supported?

Common Lua structure is handled well. Luau-specific syntax may not indent perfectly — treat the result as a starting point.

Related tools