Lua Beautifier

Beautify, format, and clean up your Lua code instantly in a secure, client-side environment.

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

About Lua Beautifier

Lua is a lightweight scripting language widely used in game development (Roblox, World of Warcraft addons, Love2D), embedded systems, and configuration files for tools like Nginx and Redis. When Lua scripts are minified for distribution or written without consistent formatting, they become difficult to read and debug.

Our Lua Beautifier restructures messy or compressed Lua code with clean indentation, proper block alignment, and readable spacing. All formatting happens locally in your browser — your code never leaves your machine. Use it to clean up game scripts, debug addon code, or standardize formatting across your Lua projects.

help

How to Use

01

Paste Your Lua Code

Copy your minified or messy Lua code and paste it into the input editor on the left.

02

Beautify or Minify

Click "Beautify" to format with proper indentation, or "Minify" to compress for production use.

03

Copy the Result

Use the copy button to grab your formatted Lua, or download it as a .lua file.

quiz

Frequently Asked Questions

What is a Lua Beautifier? expand_more
A Lua Beautifier is a tool that takes minified, compressed, or poorly formatted Lua code and restructures it with consistent indentation, proper block alignment for functions, if/else blocks, and loops, making it easy to read and maintain.
Does this tool handle all Lua syntax? expand_more
Yes. The beautifier handles standard Lua constructs including functions, local functions, if/elseif/else blocks, for/while/repeat loops, table constructors, and nested blocks with proper indentation.
Is my Lua code secure? expand_more
Yes. All formatting is performed entirely in your browser using JavaScript. Your Lua code never leaves your machine and is not sent to any external server.
Can I customize the indentation? expand_more
Yes. Choose between 2 spaces (default), 4 spaces, or tab-based indentation using the selector in the toolbar before formatting.
Can I use this for Roblox Lua scripts? expand_more
Yes. The beautifier works with standard Lua syntax which covers Roblox Luau scripts, Love2D code, World of Warcraft addons, and any other Lua-based projects.